mzim
Well-known member
instantiation(solve)
why it cannot instantiate the form?
what's wrong w/ it?
thanks in advance
why it cannot instantiate the form?
what's wrong w/ it?
VB.NET:
Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click
Dim f As Form1
checkinstantiation(f)
End Sub
Function checkinstantiation(ByVal fr As Form)
If fr Is Nothing Then
fr = New fr()<-----it gets an error here:[i]"fr is not defined"[/i]
fr.Show()
fr.MdiParent = Me
Else
fr.Activate()
End If
End Function
Private Sub MenuItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem3.Click
Dim f1 As Form2
checkinstantiation(f1)
End Sub
Private Sub MenuItem4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem4.Click
Dim f2 As Form3
checkinstantiation(f2)
thanks in advance
Last edited: