Results 1 to 2 of 2

Thread: hide a form before it is shown on startup

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    1,276

    Resolved hide a form before it is shown on startup

    I don't want the form to be shown at all on startup. The form can be hidden on another event on the form like a button click but that won't do.

    On Form1_Load this.Visible = false; or this.Hide(); won't hide the form.

    I even tried this:
    Code:
    static void Main() 
    {
    	Form1 frm1 = new Form1();
    	frm1.Visible = false;
    	Application.Run(frm1);
    }
    and the form still shows...

    is there any way to do this?
    Last edited by wey97; Nov 10th, 2004 at 09:39 AM.

  2. #2

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    1,276
    Didn't realize Application.Run() was overloaded...

    Code:
    static void Main() 
    {
    	Form1 frm1 = new Form1();
    	Application.Run();
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width