Page 1 of 1

Displaying a new Form

Posted: Thu Jul 30, 2009 5:04 am
by Click16
Hey everyone... I have a problem. I was working on my Halo 2 App when suddenly something stopped me. I went to debug the app, and I got no exceptions. Though I have no exceptions, I had a larger problem. Every time the application starts, the form that is supposed to be displayed is not displayed. Instead, I get a blank form. No title, no contents, It has the standard size which is 300 x 300.

here is what I mean.

the window looks like this:
Image

once i click debug i get this:
http://i26.tinypic.com/2navex1.png


My Program.cs has it set to this:

Code: Select all

...
            Application.Run(new Form1());
        }
    }
}
So I know that it isn't running like this:

Code: Select all

...
            Application.Run(new Form());
        }
    }
}
Let's say that I set it to be a different form, It will run that form. It just seems to fail loading Form1. In response, it runs a complete new form.

Re: Displaying a new Form

Posted: Thu Jul 30, 2009 11:35 am
by XZodia
it appears to be loading form2...

Re: Displaying a new Form

Posted: Thu Jul 30, 2009 4:08 pm
by Click16
xzodia wrote:it appears to be loading form2...
no, Form2 is different. It is just loading a NEW FORM. like this:

Code: Select all

Form RandomName = new Form();
RandomName.Show()

Re: Displaying a new Form

Posted: Fri Jul 31, 2009 6:26 am
by troymac1ure
What is your main form and is it actually set to that?

Try stepping through the prgram with F11 and see where it starts.

Re: Displaying a new Form

Posted: Fri Jul 31, 2009 3:42 pm
by OwnZ joO
Make sure you didn't remove the call to InitializeComponent in the constructor of Form1 or something like that.