Add these to form from Toolbox: TextBox, FontDialog, MenuStrip, OpenFileDialog, SaveFileDialog
Configure Textbox: Multiline (True), Dock (Fill)
Add items to menu (MenuStrip has "Insert Standard Items" functionality that is helpful) and code functionality for these, for example the "Font..." menu choice:
If Me.FontDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
Me.TextBox1.Font = Me.FontDialog1.Font
End If
The "Wordwrap" choice:
Me.TextBox1.WordWrap = Not Me.TextBox1.WordWrap
The File "Open..." choice:
If Me.OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
Me.TextBox1.Text = My.Computer.FileSystem.ReadAllText(Me.OpenFileDialog1.FileName)
End If
The File "Save..." choice:
If Me.SaveFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
My.Computer.FileSystem.WriteAllText(Me.SaveFileDialog1.FileName, Me.TextBox1.Text, False)
End If
TextBox class has Undo, SelectAll, Cut, Copy and Paste methods, to be used with the menu edit options. Context menu with editing options and editing keyboard shortcuts comes for free with the Textbox.
Insert date/time?
Me.TextBox1.SelectedText = Date.Now.ToString
Printing is a bit more complex, some preparations is needed. First add a PrintDialog and a PageSetupdialog to form. You also need a PrintDocument, I'd use the inherited TextPrint class posted at
A .NET Text Printing Class... That Works!, add the class to project. Sadly this class is missing a parameterless constructor so you have to add one too:
Then you can recompile and the TextPrint component will then display in Toolbox, add one of those also to the form. Configure the Document properties for the PrintDialog and PageSetupdialog by selecting the TextPrint1 printdocument instance. Then the code for the File "Print..." option:
If Me.PrintDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
Me.TextPrint1.Text = Me.TextBox1.Text
Me.TextPrint1.Print()
End If
Page setup menu choice just need this code:
Me.PageSetupDialog1.ShowDialog()
Notepad doesn't have print preview, but you can easily add this also, add a PrintPreviewDialog to form and set Document property to the TextPrint1 instance, then this code for the menu item:
Me.TextPrint1.Text = Me.TextBox1.Text
Me.PrintPreviewDialog1.ShowDialog()
That should be about it basically.
I didn't see until now that your forum profile states VB 2003, but I think all of this is also available for you.
Edit: I know VB 2003 doesn't have MenuStrip, it was new in VB 2005, but it has something called MainMenu that can be used instead.