How To Show New Form In VS2005?

  • Thread starter Thread starter joey.powell
  • Start date Start date
J

joey.powell

Hello,

I have written several windows forms applications with VS2003. When I
did this, I would create a new instance of a form and then call show or
showmodal to open it, like below...

_NewForm NewForm = new _NewForm;
NewForm.Show();

....or...

_NewForm NewForm = new _NewForm;
NewForm.ShowModal();

This doesn't work, however, in VS2005. What am I missing here. How
should I open forms now?
 
_NewForm NewForm = new _NewForm;
NewForm.ShowModal();

This doesn't work, however, in VS2005. What am I missing here. How
should I open forms now?

What exactly is failing? Do you get a compile-time or runtime error?

You're missing the parentheses in the object instantiation:

_NewForm NewForm = new _NewForm();
^^


Mattias
 
Back
Top