10-14-2011, 08:30 PM
Don't delete this! I changed this post to part 1 so there is no need in deleting it, it's no longer the same as part 2.
Hey everyone, thought i would make a TUT about VB since i dont see any ;D This tutorial will be 4 different parts; Windows forms Basics, Some advanced WF things, Console application basics, some advanced console app things. So lets get started...
Part 1
Fisrt we'll start by making a simple web browser. This is simple but pretty neat because, well, you can browse the web with it! ;P
So first we need to make a new windows forms application:
Next add 5 buttons & 1 combo box , make it look something like this:
now click on the form and change the MaximizeBox property to false:
originally:
should now be:
what that does is makes it to where the user CANNOT maximize the box. The reason we did this is because you cant set the dock of a web browser to fill without it covering all of our other controls up.
now, FINALLY, add a web browser control. Set the dock property of the webbrowser to bottom.
Now time for......
Back button (Named 'NavigateBack'):
this makes the webbrowser go back 1 page.
Forward Button (Named 'ForwardNavigate'):
this makes the webbrowser go forward 1 page
Stop Button (Named 'StopNavigate'):
makes the webbrowser stop loading the current page
Go Button (Named 'GoNavigate'):
Refresh Button (Named 'RefreshWB'):
refreshes the current page in the webbrowser
WebBrowser:
this says:
If ComboBox1 contains the current pages URL then do nothing Else (else basically says if it does NOT contain the current pages URL) Add the current url to the items in ComboBox1
ComboBox:
this makes it to where when the user changes the item from the current item it will navigate to the changed item
If you want to add something a little more 'Advanced' then you can add this:
it will disable the forward and back buttons if it cant go forward or back...and one last thing before you're completely finished, click on the web browser and go to the properties box and change the 'Url' property to google or something so when the user runs the application it will automatically start up a web page instead of a blank page ;P
Everything in the web browser control is really self explanatory. if you have any questions feel free to post/PM/AIM (rogfanboy1)
Sorry if you're lazy but you will actually kinda learn more if you type it instead of C&P...
Ok! Now we're done with our browser...now we're gonna make a simple Notepad Application. This is useful for getting the hang of menu strips (The things that say 'File' 'Edit' 'Format', etc...) Another thread will be posted in a second for the second part due to the image limitations on each thread. I will update the post with the link as soon as it's done!
Hey everyone, thought i would make a TUT about VB since i dont see any ;D This tutorial will be 4 different parts; Windows forms Basics, Some advanced WF things, Console application basics, some advanced console app things. So lets get started...
Part 1
Fisrt we'll start by making a simple web browser. This is simple but pretty neat because, well, you can browse the web with it! ;P
So first we need to make a new windows forms application:
Next add 5 buttons & 1 combo box , make it look something like this:
now click on the form and change the MaximizeBox property to false:
originally:
Spoiler (Click to View)
should now be:
Spoiler (Click to View)
what that does is makes it to where the user CANNOT maximize the box. The reason we did this is because you cant set the dock of a web browser to fill without it covering all of our other controls up.
now, FINALLY, add a web browser control. Set the dock property of the webbrowser to bottom.
Now time for......
Coding our Browser
Back button (Named 'NavigateBack'):
Spoiler (Click to View)
this makes the webbrowser go back 1 page.
Forward Button (Named 'ForwardNavigate'):
Spoiler (Click to View)
this makes the webbrowser go forward 1 page
Stop Button (Named 'StopNavigate'):
Spoiler (Click to View)
makes the webbrowser stop loading the current page
Go Button (Named 'GoNavigate'):
Spoiler (Click to View)
the image for this one messed up so its supposed to be:
WebBrowser1.Navigate(ComboBox1.Text)
this makes the webbrowser go to the web page in ComboBox1.Text
WebBrowser1.Navigate(ComboBox1.Text)
this makes the webbrowser go to the web page in ComboBox1.Text
Refresh Button (Named 'RefreshWB'):
Spoiler (Click to View)
refreshes the current page in the webbrowser
WebBrowser:
Spoiler (Click to View)
this says:
If ComboBox1 contains the current pages URL then do nothing Else (else basically says if it does NOT contain the current pages URL) Add the current url to the items in ComboBox1
ComboBox:
Spoiler (Click to View)
this makes it to where when the user changes the item from the current item it will navigate to the changed item
If you want to add something a little more 'Advanced' then you can add this:
Spoiler (Click to View)
it will disable the forward and back buttons if it cant go forward or back...and one last thing before you're completely finished, click on the web browser and go to the properties box and change the 'Url' property to google or something so when the user runs the application it will automatically start up a web page instead of a blank page ;P
Everything in the web browser control is really self explanatory. if you have any questions feel free to post/PM/AIM (rogfanboy1)
Sorry if you're lazy but you will actually kinda learn more if you type it instead of C&P...
Ok! Now we're done with our browser...now we're gonna make a simple Notepad Application. This is useful for getting the hang of menu strips (The things that say 'File' 'Edit' 'Format', etc...) Another thread will be posted in a second for the second part due to the image limitations on each thread. I will update the post with the link as soon as it's done!