Closing main form during initialization
I am running D1. I need to check on several database files etc.
during the initialization of my program. I call this initialization
from my OnActivate event in my Main form. If initialization fails, I
raise an exception and show dialog boxes etc. and I need to terminate
the program.
The problem I have is that I have an event in the main form for
OnResize. The code for the OnResize event executes after the
OnActivate event code as a result I cannot get the application to
terminate with the Close command I have in my exception. I set a
variable to indicate successful initialization. How do I check this
variable immediately after all form initialization? What event can I
use?
My application consists of a tab set that drives a string grid. I
want to pick one of these tabs as part of my application but not if my
initialization failed. I sent the program through my OnClose event
which has an Application.Terminate statement in it. Even then the
OnResize event code executes afterward.
I need the OnResize event to make sure that a couple of panels,the tab
set and a bit button stay on the bottom of the form when the user
lengthens the form. I also want the form to have a uniform width at
all times and lengthen the string grid accordingly.
My kludgy workaround is to use a 'Start' button that the user must
click upon to begin using my app.
I'd appreciate any help. Delete 'spam' in my e-mail address, thanks.
***Attention spammers!***
Use of this e-mail address for unsolicited messages implies
your acceptance of a $1000 fee charged to you. I do not want
nor respond favorably to 'spam'.