argh..so frustrated

BHeemsoth

Platinum Member
Jul 30, 2002
2,738
0
76
I have alot of experience in VB, but for my IT101 project I need to use vs.net.

I have the entire bloody project done, except I cannot for the life of me get additional forms to load.

For example, I want to click a button on frmmain and load frmeasy.

In vb I would have done:

Load frmeasy
frmeasy.show
frmmain.hide


This does not work in VS.net, and neither does anything else I tried.

Someone please please please help me. I have been trying to figure this one stupid thing out for 2 hours.

Thanks ATOT!

Brian
 

BHeemsoth

Platinum Member
Jul 30, 2002
2,738
0
76
Originally posted by: Schrodinger
Dim x As New frmeasy
x.Show()
MyClass.Hide()

Edit: Forgot about the MyClass, sorry ;)

arghh.. now it says my forms are undefined... what to do????? please help
 

Descartes

Lifer
Oct 10, 1999
13,968
2
0
Are they all in the same namespace? Let Intellisense help you out a bit mah brutha. At a minimum, post the declaration (not the entire body please) of your respective forms and let us have a look-see.
 

Schrodinger

Golden Member
Nov 4, 2004
1,274
0
0
Originally posted by: rpbri2886
Originally posted by: Schrodinger
Dim x As New frmeasy
x.Show()
MyClass.Hide()

Edit: Forgot about the MyClass, sorry ;)

arghh.. now it says my forms are undefined... what to do????? please help

What does it say, specifically?
 

BHeemsoth

Platinum Member
Jul 30, 2002
2,738
0
76
Originally posted by: Schrodinger
Originally posted by: rpbri2886
Originally posted by: Schrodinger
Dim x As New frmeasy
x.Show()
MyClass.Hide()

Edit: Forgot about the MyClass, sorry ;)

arghh.. now it says my forms are undefined... what to do????? please help

Type 'frmeasy' is not defined.

Reference to a non-shared member requires an object reference.


thank you sooo much
 

BHeemsoth

Platinum Member
Jul 30, 2002
2,738
0
76
very very simple, this is only the intro page

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If nud1.Value = 1 Then

Dim x As New frmeasy
x.Show()
frmmain.Hide()

End If



End Sub
 

Schrodinger

Golden Member
Nov 4, 2004
1,274
0
0
first of all, take out frmmain and change it with MyClass.Hide()

Edit: that is, if the form is named frmmain and not the particular instance otherwise it would be okay. judging from your naming scheme its not a reference though.
 

BHeemsoth

Platinum Member
Jul 30, 2002
2,738
0
76
Originally posted by: Schrodinger
first of all, take out frmmain and change it with MyClass.Hide()

Edit: that is, if the form is named frmmain and not the particular instance otherwise it would be okay. judging from your naming scheme its not a reference though.

gotcha

Still saying frmeasy is not defined though