see this screen shot and you will know what is the problem
when i write form2.show
it give me an error says
Reference to a non-shared member requires an object reference.
You need to create a new object of Form2 and then show it:
Code:
Dim Frm2 = New Form2()
Frm2.Show()
i created btw thanks solved
Originally Posted by Hassan
You need to create a new object of Form2 and then show it:
Code:
Dim Frm2 = New Form2()
Frm2.Show()
lol this will work but thats not whats wrong.
in VB u are always able to do Form2.Show()
without needing the above.
i dont knowwhy its making it error but its probably something with his Form2.VB is not referenced right i would create a form3 and try form3.show() first
In the end your code will error out with bugs in it if you dont fix ur problem the right way
the only time i have seen it do this is when u right click on form1 and add new form and it somehow adds it to form1 as a child form