Professional Documents
Culture Documents
Before u start using vb6 or 8 u need to know a few fundamentals of its lay out, page 1
will get u familiar with what u will need to know at the beginning in order to do the
tutorials, the tutorials will be in vb6 at first from here we will progress to vb8, dotnet,java
and asp.net one step at a time though. I want to make it clear I do not claim to be a pro
programmer or anything like that I am self taught and the reason for these tutorials is
because when I was first starting out I wished I had tutorials to follow to make the
learning easier so hopefully these help someone or u know of someone who wants to get
into programming but doesn’t know were to start.
I Want to warn you in the beginning you going to be saying . . . huh,erm ,ahh, oooo,
wtf??! Many times but just keep on reading try to understand and in the end you will
persevere, there will be more than one tutorial in this lesson because honestly not many
people manage through the first tutorial of anything there first time so if you u get stuck
move on to the 2nd and 3rd get familiar with the interface and the rest will come to you
naturally, my girlfriend said something to me which makes so much sense but I never
realized it until she pointed it out she said programming is easier than language its self
and she couldn’t be more right. Programming is basic and simple hopefully as time
passes u will realize this yourself,
Lets get started!
• Event Procedures - Code related to some object. This is the code that
is executed when a certain event occurs.
Click on your form to select it then on the tool bar about click the menu editor icon
you will see this screen:
I wont get into to much detail here just the necessity’s in the Caption Tab type in About
and below that in the name Tab type in nmeAbout. Now the best why for me to explain
what we have done is that the name you wrote in the caption will appear on the form this
is for the user of the application to navigate around the program for example if he wanted
to know about the program he is using e.g. the version he or she would click there about
button. There still isn’t any coding though this will come shortly once the tabs have been
completed click the next button and type in the following:
Caption: Donate
Name: nmeDonate
Next Button
Caption: Register
Name: nmeRegister
Next Button
Caption: Contact
Name: nmeContact
Next Button
Caption: Help
Name: nmeHelp
Next Button
Then finally click ok and your form should look like this:
Now for the fun part the Coding double click on the about on your form and you will see
the following:
Notice the name of the button being nmeAbout we name them like this so we don’t get
confused the all the labels or buttons in the application. Now between Private Sub and
End Sub type the following code: msgbox “MP3 player v1.0 beta” then close the coding
box and on the top tool bar click the start icon this will test your application do this
and then click on the About button and it should give u the following message:
And that’s it all you would do know is full in the missing code for
Donate,Register,Contact And Help. Once again here are some examples.
And of cause u can type in what ever you want inbetween the inverted commas.
Lesson 2: Components
the next lesson will make use of components in this case the windows media player
component, right click on your toolbox(the toolbar on your left) click on components add
look for the windows media player:
Select it and click apply u will see it is now available in your toolbox:
Click it and drag it into your form and position it like so:
1 label
First place the command button it will call its self by default command1 in the properties
box scroll until you find the captions field :
Rename it to Play adds the textbox and clear the text field in the properties box
Then add a label and in its caption field type in URL
Your form should now look like this:
It is up to you to design the layout of your program this is very important u want its as
user friendly as possible, this is how mine is designed it doesn’t have to look the same
just as long as you know were to put the button, textbox and label your can resize them as
you like.
This code is pretty self explanatory don’t u think?? You don’t have to type in the green
text as that is the explanation of the code we just used
Lesson 3: Winsock
The next lesson is the easiest of them all providing you managed to do the 2 pervious
exercises, we need to once again add a component this one is the Microsoft winsock
control
Now add a button and a textbox next to it rename the caption of the button to IP Address
and clear the textbox and your form should look like this :
(don’t forget to add the component to ur form)
And that’s it try out these 3 tutorials and try familiarize yourself with vb6 on even add
the first lesson to the last 2 once your are don with each lesson make your you save your
projects if want to compile them to exe’s go file>make an.exe
Lesson 4
Once again a nice and easy one the will put what u have learn so far together, add a text
box to your form and resize It like mine then double click anywhere on the form not the
textbox and you should see this:
Notice the code Text1.text = now is in the form load section and not the textbox area
This basically means when your run your application the form will load the code and you
will have the following :
You by now should have learn how to make 3 working applications and how to add a
menu editor to each as a practice exercise why don’t u try adding the timer to each of
those applications if your unsuccessful don’t worry ill show you how to do that in the
next tutorial and more.