-
Ok I am a mdi form and i have a menu, it will do commands like new, save, save as, open, and exit. I have the new command do this:
'Make a new Code Window object
Dim NewWindow As New FRMCode
'Display the New code window object
NewWindow.Show
On the FRMCode form I have a Rich Text Box called CODE. How can I if I hit the Save menu button on my MDI form, tell it which mdi child to save?
-
This is something I just worked out in my little homemade browser. An easy way to do it is to use the MDI form's ActiveForm property:
Code:
'in the MDI form
Private Sub mnuSave_Click()
'a quick save example to save the text of CODE on on the currently active child window
Open "c:\dummyfile.txt" For Output As #1
Print #1, MDIForm.ActiveForm.CODE.Text
Close #1
End Sub