Random Stuff
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Latest topics
» Hacxing...
Learning Visual Basic 6 Icon_minitimeWed Dec 31, 2008 10:03 pm by Seanshoots

» Smiley Wars! :D
Learning Visual Basic 6 Icon_minitimeThu Dec 18, 2008 10:44 pm by Seanshoots

» plzz plzz sign up
Learning Visual Basic 6 Icon_minitimeSat Nov 29, 2008 5:59 pm by spikester145

» Bye - Bye
Learning Visual Basic 6 Icon_minitimeSat Nov 29, 2008 2:15 pm by spikester145

» i really belived in this site
Learning Visual Basic 6 Icon_minitimeFri Nov 28, 2008 5:46 pm by Bob

» Need an Banner
Learning Visual Basic 6 Icon_minitimeWed Oct 29, 2008 11:03 pm by Bob

» Over?
Learning Visual Basic 6 Icon_minitimeThu Oct 16, 2008 7:51 pm by Seanshoots

» Meet the staff.
Learning Visual Basic 6 Icon_minitimeMon Sep 01, 2008 10:29 am by Bob

» GM Applications.
Learning Visual Basic 6 Icon_minitimeFri Aug 29, 2008 9:41 pm by Bob

» Guess What. Im Back!!!!!
Learning Visual Basic 6 Icon_minitimeSun Aug 24, 2008 1:09 pm by Bob

» Tell me what you think
Learning Visual Basic 6 Icon_minitimeSun Aug 24, 2008 1:08 pm by Bob

» Updates!
Learning Visual Basic 6 Icon_minitimeSat Aug 23, 2008 6:32 pm by Bob

» The Third
Learning Visual Basic 6 Icon_minitimeWed Aug 20, 2008 5:52 pm by Bob

» The Excuse Game!
Learning Visual Basic 6 Icon_minitimeMon Aug 18, 2008 6:25 pm by Bob

» the server as died? Oo
Learning Visual Basic 6 Icon_minitimeMon Jul 28, 2008 6:18 pm by Bob

Who is online?
In total there is 1 user online :: 0 Registered, 0 Hidden and 1 Guest

None

[ View the whole list ]


Most users ever online was 72 on Sun Apr 11, 2021 8:50 pm
Statistics
We have 20 registered users
The newest registered user is alodivivi

Our users have posted a total of 726 messages in 75 subjects
Affiliates
This section is open for advertisments. Email headshotclan9994@aol.com for information.
 
GuestBook
Click here to let us know what you think of are website while you wait to sign up. Also if you have any problems signing up you can ask here. View my Guestbook
Free Guestbooks by Bravenet.com
Counter

Learning Visual Basic 6

Go down

Learning Visual Basic 6 Empty Learning Visual Basic 6

Post by Seanshoots Sat May 31, 2008 8:08 pm

Learning VB6


Since you are here, I take it you would like to learn VB6.
To all: Sorry about image quality, hoster sucked.

I dont know if i can post a download link for it, because thats called Warez.
Just search it on "The Pirate Bay" or something.The Pirate Bay

Starting with VB6.

To start off, we will make a simple "Hello World" application.

Start a new project, make it a "Standard EXE"

You should now have something that looks like this:

Learning Visual Basic 6 1

You can change the caption to whatever on the toolbox on the right, but you dont need too.

Now, lets make a button on the middle of our form.

In this picture, I will also show how to change captions of buttons + things.
It should look like this:
Learning Visual Basic 6 2

Then, double click the button.
A code window should pop up only saying:
Code:
 Private Sub Command1_Click()

End Sub

We are going to make it so it opens a message box when clicked.
Paste this code inbetween the code:
Code:
lol = MsgBox("Hello World!", vbOkOnly)

What this is doing, it tells windows to open a message box when the button 'Command1' is clicked.
where it says 'lol' it can say anything. That is of no use for you right now.
The message in the messagebox is defined inbetween the quotes (""), you can change it to anything.
After the quotes, it tells it to only have an OK button, you can change that too.

vbOKOnly - Only have OK Button
vbOkCancel - Have OK + Cancel Button
vbYesNo - Have a Yes + No Button
vbYesNoCancel - Have a Yes + No + Cancel Button
vbAbortRetryIgnore - Have an Abort + Retry + Ignore Button
vbRetryCancel - Have a retry + cancel button


These buttons will all do nothing except close the messagebox, though.
That would be explaining variables, coming later.

Anyways, close the code window once done editing, then press 'F5".
Your Program should run without errors. You can click the button, and a message box will pop up!
How cool!

Wait for more tutorials by me!
Seanshoots
Seanshoots
RandomMS Owner
RandomMS Owner

Number of posts : 210
Age : 28
Location : Vancouver, BC. Go Canada!
Registration date : 2008-05-24

Character sheet
Bob's Field:

http://seanspsppimping.blogspot.com

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum