G
Guest
I have three forms.
The first is opened when the application starts. It has a New option that when selected creates a second form a calls ShowDialog() on that form.
The dialog form (when filled in) creates a third form and then shows it (using Show()), before calling close() on itself.
The problem is that instead of the focus being set on the form created by the dialog, it reverts back to the first form.
If I don't call close on the dialog, the focus is correct. Also, if I show the second form using just Show() instead of ShowDialog(), when the close() is called the third form is correctly focused.
Is there some issue I haven't considered when using ShowDialog()?
The first is opened when the application starts. It has a New option that when selected creates a second form a calls ShowDialog() on that form.
The dialog form (when filled in) creates a third form and then shows it (using Show()), before calling close() on itself.
The problem is that instead of the focus being set on the form created by the dialog, it reverts back to the first form.
If I don't call close on the dialog, the focus is correct. Also, if I show the second form using just Show() instead of ShowDialog(), when the close() is called the third form is correctly focused.
Is there some issue I haven't considered when using ShowDialog()?