Happycracker .NET tutorial 1 *read for more info*

The Joker

Onyx user!
Reputation
0
I remember when I first started programming, I wanted help, and no one would help me. So, I taught myself. I'm going to write some simple tutorials for you guys to learn from. These were on my website about 3-4 months ago, and I took it offline.

--

Working with Controls​

Controls in VB2010 are useful tools that can be placed in the form to perform various tasks. They are used to create many kinds of Windows applications. The diagram on the right is the Toolbox that contains the controls of VB2010. They are categorized into Common Controls, Containers, Menus, Toolbars, Data, Components, Printings and Dialogs. At the moment, we will focus on the common controls. Some of the most used common controls are Button, Label, ComboBox, ListBox, PictureBox, TextBox etc.

To insert a control into your form, you just need to drag the control and drop it into the form. You can reposition and resize it as you like. Lets examine a few programs that made use of Button, Label, TextBox , ListBox and PictureBox . You don't have to worry so much about the code because I will explain the program syntax as you progress to later lessons.
UnBVd.gif


When you click on the Toolbox tab, the common controls Toolbox will appear.
iwEJm.gif


1.1 Creating your first program

To create your first program, drag the button control into the form, and change its default Text Button1 to OK in the properties window, the word OK will appear on the button in the form, as shown below:
WiCOe.gif


Now double click on the OK button and the code window appears. Enter the code as follows:
5ScpH.gif


When you run the the program and click on the OK button, a dialog box will appear and display the "WELCOME TO VISUAL BASIC 2010" message,as shown below:
SQxtg.gif


There you are, you have created your first VB2010 program.

==

I hope this helps you new programmers out, I'll be adding a new tutorial every couple of days, I just want to see the responses, etc on this. I know this is the easiest thing you can do in programming, but its a place to start. The next tutorial will show you the uses of text boxes, by creating a calculator.
 
Thanks. I have never used this but don't you have to add something to the "Ok" button so it closes when you click ok.
 
Domcon said:
Thanks. I have never used this but don't you have to add something to the "Ok" button so it closes when you click ok.

You can add a " Ok, cancel " messagebox. I'll add that to a later tutorial. I'll be writing a tutorial using text boxes, by making a calculator, so the student knows how to use integers, etc.

You can also, click " Ok " and it will close the message box.
 
Oh, thanks I might try this but my main goal is web dev.
 
Domcon said:
Oh, thanks I might try this but my main goal is web dev.

Like PHP/HTML?

I know someone who is BEAST in PHP, I'll get him to join.
 
Why would you copy/paste a tutorial this easy to make?

Come on, give credits.
 
I didn't copy and paste the tutorial.
 
Back
Top