So Form1 is used to allow the user to log into the application? Is that
right? There are a couple ways to handle this.
(1)
Ensure that Form2 is set to be the startup Form, the one that is passed to
the "Run" method of the Application class, and then display the login Form
from the Load event of Form2 by calling the login Forms ShowDialog method.
You can see an example of this in the TaskVision sample application
(
http://windowsforms.net/Applications...=20&tabindex=8)
..
(2)
Use the ApplicationContext class to initially display the login Form, and
then switch over to Form2 when the login Form is closed and the user is
validated. You can see an example of this in relation to a splash screen
here (
http://www.codeproject.com/csharp/Ap...extSplash.asp).
There may be others ways to accomplish this but there are two methods
outlined above and one of those should fit your requirements.
--
Tim Wilson
..Net Compact Framework MVP
"ematrix" <it******@eyou.com> wrote in message
news:e1**************@TK2MSFTNGP12.phx.gbl...
Form2 is the main form for working but Form1 is a form used for logging
only.
"Tim Wilson" <TIM(UNDERSCORE)WILSON(AT)ROGERS(PERIOD)COM> дÈëÏûÏ¢
news:#o**************@TK2MSFTNGP10.phx.gbl... AFAIK, no, you cannot. What is the purpose of Form1? Why is it the first
one to be shown but also must close?
--
Tim Wilson
.Net Compact Framework MVP
"ematrix" <it******@eyou.com> wrote in message
news:u7****************@TK2MSFTNGP10.phx.gbl... Thanks a lot
But that two methods are not good,can I change Form2 to main form before closing Form1,thanks