10-14-2011, 08:26 PM
Don't delete this! I changed this post to part 2 so there is no need in deleting it, it's no longer the same as part 1.
Part 2
Make a new Windows forms application (dont name it My Web Browser ;P, lol):
Now, add 1 menu strip, 1 context menu, 1 RichTextBox. Make it look something like this:
Now to set the context menu!
or add the following:
Undo
Redo
-
Cut
Copy
Paste
Delete
-
Select All
Now if you couldnt see the menu strip in the picture, or havent added any of the options you saw on there yet then you need to go ahead and do that...the options and items are:
Now its time for...
Coding Our Notepad
Coding The Context Menu (Named ' ContextMenuStrip1'):
everything under here is pretty self explanatory...
once you've got that done go to the RichTextBox properties and go to ContextMenuStrip and change it to ContextMenuStrip1 (or whatever you named it)
Should be:
Coding The Menu Strip (File, Edit, etc...(Named 'MenuStrip1'):
New:
Code definitions:
If RichTextBox2.TextLength > 0 Then --- Saying if the length of text in RichTextBox2 is greater than 0 Then...
MsgBox("Are your sure...bla bla", MsgBoxStyle.Information, "Continue?") --- Saying MsgBox("Text to be displayed in message box", The mssage box style, "the title of the message box")
-----
Under 'File':
-----
Open:
Dim open As New OpenFileDialog --- Make a new OpenFileDialog called open
open.CheckFileExists = True --- Makes sure that the selected file actually exists
open.CheckPathExists = True --- Makes sure that the path of the selected file exist
open.InitialDirectory = "Documents" --- Makes the starting directory of 'open' MyDocuments
open.MultiSelect = False --- Makes it to where the user cannot select more than 1 file
Save as:
Exit:
-----
Now under 'Edit':
-----
Font:
Font Color:
Background Color:
-----
Now under 'About/Info':
-----
About:
I will be working on a Part 2 for more advanced things. Thanks for reading!
Part 2
Simple Notepad App
Make a new Windows forms application (dont name it My Web Browser ;P, lol):
Now, add 1 menu strip, 1 context menu, 1 RichTextBox. Make it look something like this:
Now to set the context menu!
Spoiler (Click to View)
or add the following:
Undo
Redo
-
Cut
Copy
Paste
Delete
-
Select All
Now if you couldnt see the menu strip in the picture, or havent added any of the options you saw on there yet then you need to go ahead and do that...the options and items are:
Spoiler (Click to View)
Now its time for...
Coding Our Notepad
Coding The Context Menu (Named ' ContextMenuStrip1'):
Spoiler (Click to View)
everything under here is pretty self explanatory...
once you've got that done go to the RichTextBox properties and go to ContextMenuStrip and change it to ContextMenuStrip1 (or whatever you named it)
Should be:
Spoiler (Click to View)
Coding The Menu Strip (File, Edit, etc...(Named 'MenuStrip1'):
New:
Spoiler (Click to View)
Code definitions:
If RichTextBox2.TextLength > 0 Then --- Saying if the length of text in RichTextBox2 is greater than 0 Then...
MsgBox("Are your sure...bla bla", MsgBoxStyle.Information, "Continue?") --- Saying MsgBox("Text to be displayed in message box", The mssage box style, "the title of the message box")
-----
Under 'File':
-----
Open:
Spoiler (Click to View)
Dim open As New OpenFileDialog --- Make a new OpenFileDialog called open
open.CheckFileExists = True --- Makes sure that the selected file actually exists
open.CheckPathExists = True --- Makes sure that the path of the selected file exist
open.InitialDirectory = "Documents" --- Makes the starting directory of 'open' MyDocuments
open.MultiSelect = False --- Makes it to where the user cannot select more than 1 file
Save as:
Spoiler (Click to View)
Exit:
Spoiler (Click to View)
Application.End()
-----
Now under 'Edit':
-----
Font:
Spoiler (Click to View)
Font Color:
Spoiler (Click to View)
Background Color:
Spoiler (Click to View)
-----
Now under 'About/Info':
-----
About:
Spoiler (Click to View)
I will be working on a Part 2 for more advanced things. Thanks for reading!
Say Thanks! (Click to View)
It took me a long time to write this, a simple 'Thanks!' would suffice.