0

Hi.
I am working on vb.net and i want ot link a form with a button so when i click on button the form show but it contain error kindly guide
code is this:
Dim myform As New Form1
myform.Show()
and the compiler show error on myform.show()

Edited by fantyfiz: i forget to add code

3
Contributors
3
Replies
15
Views
2 Years
Discussion Span
Last Post by fantyfiz
0

OK, you have an error and it seems in a way related to a form.
Could you please also specify WHAT error?
If I told you I have a car, would you know what car I have?

0

Why would you want to load form1 again? Anyway it works for me without an error.
Try:

Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
        Dim myform As New Form
        myform.Show()
    End Sub
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.