G
Guest
Hi,
I am trying to prevent a form from being closed by the user until the code
in the OnLoad method executes. This code can take quite some time to
complete executing. This form itself is launched from my main form using
ShowDialog.
I cannot use an approach like having another form showing 'Please Wait' or
something to that effect.
The basic problem here is that I need to run some code on the Close event of
the form, which does not get executed if the user closes the form as I
described.
I guess another way of asking my question is whether there is any way the
code in the Close event will ALWAYS get executed - some other event etc?
I am trying to prevent a form from being closed by the user until the code
in the OnLoad method executes. This code can take quite some time to
complete executing. This form itself is launched from my main form using
ShowDialog.
I cannot use an approach like having another form showing 'Please Wait' or
something to that effect.
The basic problem here is that I need to run some code on the Close event of
the form, which does not get executed if the user closes the form as I
described.
I guess another way of asking my question is whether there is any way the
code in the Close event will ALWAYS get executed - some other event etc?