Small MDI / Function question
Hi,
I having some trouble creating/using functions.
What I thought I could do:
VB Code:
'frmMain MDI Parent
Private Sub mnuFileNew_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mnuFileNew.Click
Dim frmDoc As New frmDocument()
frmDoc.MdiParent = Me
frmDoc.Show()
End Sub
Private Sub mnuFileSave_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mnuFileSave.Click
Dim activeChild As Form = Me.ActiveMdiChild
If (Not activeChild Is Nothing) Then
activeChild.MySaveFunction
End If
End Sub
'frmDocument
Public Function MySaveFunction()
rtfbox.savefile("d:\test.txt")
End Function
But then it keeps saying that MySaveFunction is not a member of 'System.Windows.Forms'.
What should I do???
John