D
Dom
I want a window that acts like a dialog box, but is not a dialog box.
Here is the problem:
The constructor of the form takes a great deal of time, since it needs
to read a large table in a DB. Therefore, I don't want to go through
the usual ShowDialog(), Hide(), Dispose() routines, since this will
force me to destroy the form, and construct a new one each time it is
used. Even if I skip the Dispose(), ShowDialog() seems to reset
things for me, which I also don't want. I want the user to see the
form just as it was when he was finished with it the last time it was
used. So instead, I do this:
1. Construct the form at startup.
2. Make the form invisible.
3. Set the owner of the form to the Main window. This prevents the
user from going back to the main form, while the subform is showing.
4. Make the form visible, when the user needs is.
5. Make the form invisble, when the user is through with it.
This does exactly what I need, except it seems to mimic a Show()
method, not a ShowDialog() method, in that the execution of the main
form does not stop until the user is through with the subform.
Am I missing something?
Here is the problem:
The constructor of the form takes a great deal of time, since it needs
to read a large table in a DB. Therefore, I don't want to go through
the usual ShowDialog(), Hide(), Dispose() routines, since this will
force me to destroy the form, and construct a new one each time it is
used. Even if I skip the Dispose(), ShowDialog() seems to reset
things for me, which I also don't want. I want the user to see the
form just as it was when he was finished with it the last time it was
used. So instead, I do this:
1. Construct the form at startup.
2. Make the form invisible.
3. Set the owner of the form to the Main window. This prevents the
user from going back to the main form, while the subform is showing.
4. Make the form visible, when the user needs is.
5. Make the form invisble, when the user is through with it.
This does exactly what I need, except it seems to mimic a Show()
method, not a ShowDialog() method, in that the execution of the main
form does not stop until the user is through with the subform.
Am I missing something?