Moving From One Form To Another During Runtime
Posted on 2007-12-06
I have this problem. I am developing a Windows Application with VB.NET, I have several forms, and what I need to do is allow the user to move from one form to another based on the "Button" Control he clicks on, so if he clicks on "btnAddCustomer" button the main window should disappear and the "frmAddNewCustomer" form should appear. the main window is called "frmMain", when I tried the following code, nothing happens, the debugger just exits without giving any error message:
so I tried the following code:
And I get the same results, the debugger just exits without giving any warning or error message.
I am kind of lost, I remember with VB6 I used to use the following code and used to work prefectly:
so, would anyone have any clue how to tackle this problem?
Thanks in advance.