Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form Activation
Message
 
To
01/11/2006 23:37:53
General information
Forum:
ASP.NET
Category:
Forms
Title:
Miscellaneous
Thread ID:
01166281
Message ID:
01166568
Views:
15
I figured it out about 2 minutes ago... I just put a this.Activate() in the Login form's Shown event.

Thanks for the response,

Richard

>Richard,
>
>I created a quickie MDI Parent form (with absolutely nothing on it), then did as you did in the Shown event, simply instantiated another form and did a .ShowDialog() .... it got focus just fine. So, I'm guessing you have some extra code there that's causing a problem, but I don't have any suggestions as to what that might be.
>
>~~Bonnie
>
>
>>In VFP, I could get the application to start without a menubar or toolbar and display and activate a login form. Once the user logged in the menu and toolbar(s) would show.
>>
>>In .NET, I have it doing something similar except for one issue. When the application shows the login form it doesn't set the focus to that form, the main MDI form retains the focus. This is what I have:
>>
>>
>>
>>private void frmMain_Shown(object sender, EventArgs e)
>>		{
>>
>>//Set up the main form
>>
>>			Boolean blnLoginSuccess = false;
>>			Boolean blnLoginError = false;
>>			frmLogin frmLogin = new frmLogin();	// Create the Login Dialog
>>
>>			do
>>			{
>>				blnLoginError = false;	//Reset
>>				frmLogin.ShowDialog(this);	// Show the Login dialog
>>
>>                     // Remainder deals with return values.
>>
>>
>>
>>Any suggestions would be appreciated.
>>
>>Richard
State of Florida, DCF
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform