Welcome To The Guide!
Things You Will Need
- A Brain
- Visual Basic 2008/2010
To get Visual Basic 2010, click here
If you have those, we can begin
So lets start with the very down to basics, the most used Features.
Creating A New Project
Spoiler:
Start by going to file and new project. Here you will have a couple options to choose from, but by default, Windows Form is chosen. So at the bottom of this form, change the name if you please and click on Ok.
Here you will see what looks to be a program! This is the start to the process. Once you have done this, we can continue.
Uses Of The ToolBox And Purposes
Spoiler:
Now that you have created you project, we can continue to talk about the features of Visual Basic. On the left side of the screen you will see a box that is bigger in length, than in width. This is properly known as the ToolBox. In this is where you can add components to your form by either click and drag, or click and click on form. So now that you know what the toolbox is and what its main purpose is for, we can continue to the next feature.
Properties Window
Spoiler:
The Properties window is located in the bottom right side of the screen. It will say it in the top left if the window. This is used for editing small things such as naming a form, or as complicated as adding a captcha. Lets continue onto the next three features.
Coding Window
Spoiler:
The Coding Window is the window used for adding functions or coding to a component inside your project. You can easily access this by either right clicking your form and clicking "View Code", or you can double click your form.
Debug/Build
Spoiler:
The debug button is used for creating your form and testing for errors and such. This is called "Debugging". In the debugging process, it will say that its "building" your project. This pretty much means that its loading all the components together, and well, building your project. Usually you would want to either A. Debug, or B. Build your project before saving. Now we can get to the last feature of Visual Basic.
Solution Explorer
Spoiler:
The Solution Explorer is a window located just above the Properties window. The main purpose of the Solution Window is to directly go to another form, or to see all the components you have added, such as a .dll, or another form.
Now that you know the most used features and what its used for, we can begin on your first project!
Your First Project
Spoiler:
Alright. To begin, first start a new project.
Double click your form to bring up the Coding Window.
Now that you are here, put this code into the line:
What this will do is create a pop-up as soon as you open your project and it will bear the message you put in between the "" 's.Code:Msgbox("Your Message Here")
Now to debug your project. Click on the green arrow located at the top middle of the window. If you followed the instructions right, as I specified above, then you will successfully debug your project and your message box will appear like this.
If you click Ok, you will see that your form will come up. We havent done anything to it yet, so itll look like a blank form.
Now lets get more in depth.
Now to create something thats a little harder than just a msgbox.
A Simple Refresher
Spoiler:
If you would like pictures, please post your request, Id be glad to do so.
Alright, to start, load up a new project and add these components to the form
- Timer
- Webbrowser
- 2 Buttons
Once you have those components up, feel free to move them around as you please, make it pretty.
Alright, now click once on button 1 and head over to the properties window. You will see that it changed and there are many new properties to change. The one were looking for is called "Text". Rename it to Start
Just like with button 1, take button 2 and rename it Stop.
Now that we have added buttons and edited properties, its time to code.
Double click your form and type the following code in:
What this will do is make it so as soon as you open your project, your webbrowser automatically goes to the website specified in the "" 's.Code:Webbrowser1.Navigate("thebotnet.com")
Now go back to your form and double click on the Start button and add this to the coding.
What this signalizes is to turn on or "Enable" Timer 1.Code:Timer1.Enabled = True
Now we reverse the process. Double click on your Stop button and type this in:
This reverses the process and turns off your timer.Code:Timer1.Enabled = False
Now to get to the timer's coding. You can find your timer at the bottom of the screen, just below your form window. Double click it, and add this code:
Now you may be wondering why it says 7000 and not 7 seconds. This is the beauty of Visual Basic. You see, they didnt want to make it like 7 or 8. They wanted it in the thousandths so you can get it down the the millisecond. So for instance, say you want 5 seconds, it would be 5000. If you wanted 15 seconds, 15000 would be what you put in.Code:Webbrowser1.Refresh("7000")
Now that you have done all these steps, its time to test your project. Start by clicking the green arrow on the toolbar just above your form window, this is the debug tool.
While in this mode, you can test whatever you have done to your form. Make sure that everything is working, and if so, youve coded your first legit program!
What should I tutorial next? A full on Webbrowser with search and cut/copy/paste, or an Advanced refresher that will have 4 speeds, slow, medium, fast, custom.
If I helped in any way, do feel free to leave a thanks
More Coming Very Soon!
Results 1 to 3 of 3
- 13 Aug. 2011 04:11am #1
[Tutorials/Terminology)Learning Visual Basic - The Basics
My Skillz
~Programing: VB.NET, C#
~HTML Coding:FLP/FMP
~Amateur Python Coder
- 23 Aug. 2011 03:37am #2
- 23 Aug. 2011 01:56pm #3
I find OP's signatures highly ironic.