Grant,
You will want to use the Activated event to handle this. First, you
have to define a flag in your class:
// Default to false, indicating that the form is not activated for the first
time.
private bool firstTimeActivation = true;
Then, you have to handle the Activated event:
// If the flag is true, then show your login form.
if (firstTimeActivation)
{
// Set the flag to false here. The reason for this is that when
// your login form is closed, this form will activate again, and
// this will be called again before you exit this block for the first
// time.
firstTimeActivation = !firstTimeActivation;
// Show your login form here.
}
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Grant Schenck" <sc******@optonline.net> wrote in message
news:eM*************@TK2MSFTNGP09.phx.gbl...
I have a C# form application. Once my main window is showing I want to
pop-up a login type dialog. What event would I trap to affect this? I
tried handling the form load but the main form window is not yet visible
then.
Thanks!
Grant Schenck