Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form Activation
Message
De
02/11/2006 09:21:11
 
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Titre:
Divers
Thread ID:
01166281
Message ID:
01166571
Vues:
16
>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


Well, hey, if it works, what the heck. <g> Still, I wonder what was causing it to not get the focus to begin with, because it certainly should have. Very weird!

~~Bonnie



>>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
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform