Click here to Skip to main content
15,891,473 members
Home / Discussions / Windows Forms
   

Windows Forms

 
AnswerRe: Dockable forms Pin
Christian Graus23-Mar-07 4:41
protectorChristian Graus23-Mar-07 4:41 
GeneralRe: Dockable forms Pin
sinosoidal23-Mar-07 4:56
sinosoidal23-Mar-07 4:56 
GeneralRe: Dockable forms Pin
Pete O'Hanlon23-Mar-07 5:02
mvePete O'Hanlon23-Mar-07 5:02 
GeneralRe: Dockable forms Pin
led mike23-Mar-07 5:02
led mike23-Mar-07 5:02 
GeneralRe: Dockable forms Pin
sinosoidal23-Mar-07 5:08
sinosoidal23-Mar-07 5:08 
AnswerRe: Dockable forms Pin
Navneet Hegde26-Mar-07 1:54
Navneet Hegde26-Mar-07 1:54 
QuestionHow can I start an app with window hidden? Pin
FinishedOnTime23-Mar-07 2:47
FinishedOnTime23-Mar-07 2:47 
AnswerRe: How can I start an app with window hidden? Pin
Pete O'Hanlon23-Mar-07 4:00
mvePete O'Hanlon23-Mar-07 4:00 
Unfortunately, you do need to call the login dialog before you call the code to create the main window. This could be accomplished from your static void Main() code:
public static void Main()
{
  Application.EnableVisualStyles();
  Application.SetCompatibleTextRenderingDefault(false);

  SecurityClass sec = new SecurityClass();
  if (sec.AuthenticateUser())
  {
    Application.Run(new MainForm(/* pass in sec if necessary */));
  }
}
Them the security class would be responsible for identifying whether or not the user was valid. This would involve displaying your login dialog. By doing this, you don't hit the Application.Run until you've validated that your user exists.

Deja View - the feeling that you've seen this post before.

GeneralRe: How can I start an app with window hidden? Pin
FinishedOnTime23-Mar-07 6:25
FinishedOnTime23-Mar-07 6:25 
GeneralRe: How can I start an app with window hidden? Pin
Pete O'Hanlon25-Mar-07 10:53
mvePete O'Hanlon25-Mar-07 10:53 
QuestionHelp me Pin
Member 395361323-Mar-07 1:23
Member 395361323-Mar-07 1:23 
AnswerRe: Help me Pin
Pete O'Hanlon23-Mar-07 1:43
mvePete O'Hanlon23-Mar-07 1:43 
Questiongisplay messeges Pin
Member 395361323-Mar-07 1:17
Member 395361323-Mar-07 1:17 
AnswerRe: gisplay messeges Pin
Pete O'Hanlon23-Mar-07 1:48
mvePete O'Hanlon23-Mar-07 1:48 
GeneralRe: gisplay messeges Pin
Marcus J. Smith23-Mar-07 8:56
professionalMarcus J. Smith23-Mar-07 8:56 
Questionslightly complex help with the splitcontainer needed! plz Pin
giddy_guitarist22-Mar-07 21:44
giddy_guitarist22-Mar-07 21:44 
AnswerRe: slightly complex help with the splitcontainer needed! plz Pin
sinosoidal23-Mar-07 1:14
sinosoidal23-Mar-07 1:14 
QuestionResource error Pin
rushiraj.jhala22-Mar-07 19:14
rushiraj.jhala22-Mar-07 19:14 
Questionhelp on DOS commands needed Pin
nithin24822-Mar-07 11:13
nithin24822-Mar-07 11:13 
QuestionHow to enumerate a ToolStripMenuItems's events Pin
hellspawnfr22-Mar-07 9:54
hellspawnfr22-Mar-07 9:54 
QuestionHelp me Pin
sureshmyway22-Mar-07 4:16
sureshmyway22-Mar-07 4:16 
QuestionText box validation Pin
Ruchi0322-Mar-07 0:49
Ruchi0322-Mar-07 0:49 
AnswerRe: Text box validation Pin
Pete O'Hanlon22-Mar-07 2:30
mvePete O'Hanlon22-Mar-07 2:30 
GeneralRe: Text box validation Pin
Ruchi0322-Mar-07 17:05
Ruchi0322-Mar-07 17:05 
QuestionHelp with a HelpButton Pin
PIEBALDconsult21-Mar-07 7:36
mvePIEBALDconsult21-Mar-07 7:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.