"Too many arguments to Public Sub New()"
Visual Basic
1
Posts
1
Posters
0
Views
1
Watching
-
I seem to be running into recurring problems with doing book exercises where my code looks exactly the same as the author's, but theirs works and mine has some sort of syntax error. my latest is: "Too many arguments to Public Sub New()" The bolded line has the blue squiggly under (Me)
Private Sub Button1_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles Button1.Click **Dim f2 As New Form2(Me)** f2.Show() Me.Hide() End Sub Private Sub Button2_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles Button2.Click Dim f2 As New Form2 f2.Show() End Sub End Class
Granted, there is another form involved here with similar code. Still coaxing software out of the can after all these years...