Passing Control

Started by John Messingham, September 19, 2004, 08:53:27 PM

Previous topic - Next topic

TechSupport

Quote from: jptchiI am using the method described herein to close the main form (a logon form) in my project.  I wasn't sure from reading this thread, but is this a temporary fix or the suggested way to close any and all main forms?

A lot depends on the organization of your project. In this case, we have a Logon form and then the main form. If the Logon form is set as the Startup Form then you can not 'Close' it, you must hide it. Closing it will terminate the application. There are two methods described in this thread to handle a Logon form. Choose whichever you like best.

QuoteI am starting a second project that has only one form that can be opened multiple times.  Is the hide method the recommended way to close these forms also?
If you only have one Form then you will need to Hide rather than Close. Like I said earlier, if you Close a Form that is designated as a 'Startup Form' then your application will end.