Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15006

Showing Another Form

$
0
0
I start a new project.
The 1st form's name = Form1.
In the Properties window I change the name to frmone.

I add another form via Project and Add Form (Windows Forms)...
The 2nd form's name = Form2.vb.
In the Properties window I change the name to frmtwo.

But my code doesn't work...
Code:

Private Sub frmone_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim frmtwo As New Form
frmtwo.show()
End Sub

Why do I have to declare frmtwo as a variable? The form already exists.

And apparently I have to set a reference to frmtwo, but I can't figure out how to do that.

So can someone please help me? Thanks.

Viewing all articles
Browse latest Browse all 15006

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>