MDI Text Editor Help

christophermclellan

New member
Joined
Jun 25, 2009
Messages
3
Programming Experience
Beginner
Hi Guys/Girls

I'm new to VB.NET, and have set myself a little challege to learn VB.NET, I was wondering if you you guys new any really good tutorials on how to create a effective MDI Text Editor?, Ive been able to create a simple text editor, however the next step is to use the MDI to be able to have mulitple windows within one form

Thanks for any help you guys give

Chris
 
There's really very little to it beyond what you've already done. The main thing would be for the main window to refer to its ActiveMdiChild, which is the child form with focus, when executing menu and tool bar actions.

By the way, please post in the most appropriate forum for the topic. Thread moved.
 
Thanks for the help

Now for the real problem, here is the code that i have wrote so far however, i have got a problem with the save part of it

Below the is the code

Private Sub SaveToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveToolStripMenuItem.Click, SaveToolStripButton.Click
Dim Save As New SaveFileDialog()

Save.Filter = "Plain Text Files(*.txt)|*.txt|All files(*.*)|*.*"
Save.Title = "Save"
Save.ShowDialog()
Try
My.Computer.FileSystem.WriteAllText(Save.FileName, DirectCast(Me.ActivateMdiChild, NewWindow).RichTextBox1.Text, False)
Catch ex As Exception

End Try
End Sub

Now the error message that i am getting is

Error 1 Argument not specified for parameter 'form' of 'Protected Sub ActivateMdiChild(form As System.Windows.Forms.Form)'. C:\Documents and Settings\ChristopherMclellan\My Documents\Visual Studio 2008\Projects\MDI Text Editor\MDI Text Editor\Form1.vb 49 75 MDI Text Editor

I was wondering if any body had any advice in tackling this

Thanks

Chris

P.s. i have attached the whole project if you require to look at the code in action
 

Attachments

  • Text Editor.zip
    104 KB · Views: 50
Back
Top