Latest topics
Top posters
Bob | ||||
Seanshoots | ||||
megalh | ||||
spikester145 | ||||
moops3 | ||||
RedFang | ||||
Aqua | ||||
rafiel100 | ||||
dragon1cefang | ||||
someguy... |
Who is online?
In total there is 1 user online :: 0 Registered, 0 Hidden and 1 Guest None
Most users ever online was 72 on Sun Apr 11, 2021 8:50 pm
Statistics
We have 20 registered usersThe 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 GuestbookFree Guestbooks by Bravenet.com
Counter
Learning Visual Basic 6
Random Stuff :: Extras :: VB6
Page 1 of 1
Learning Visual Basic 6
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:
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:
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
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- RandomMS Owner
- Number of posts : 210
Age : 28
Location : Vancouver, BC. Go Canada!
Registration date : 2008-05-24
Character sheet
Bob's Field:
Random Stuff :: Extras :: VB6
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|
Wed Dec 31, 2008 10:03 pm by Seanshoots
» Smiley Wars! :D
Thu Dec 18, 2008 10:44 pm by Seanshoots
» plzz plzz sign up
Sat Nov 29, 2008 5:59 pm by spikester145
» Bye - Bye
Sat Nov 29, 2008 2:15 pm by spikester145
» i really belived in this site
Fri Nov 28, 2008 5:46 pm by Bob
» Need an Banner
Wed Oct 29, 2008 11:03 pm by Bob
» Over?
Thu Oct 16, 2008 7:51 pm by Seanshoots
» Meet the staff.
Mon Sep 01, 2008 10:29 am by Bob
» GM Applications.
Fri Aug 29, 2008 9:41 pm by Bob
» Guess What. Im Back!!!!!
Sun Aug 24, 2008 1:09 pm by Bob
» Tell me what you think
Sun Aug 24, 2008 1:08 pm by Bob
» Updates!
Sat Aug 23, 2008 6:32 pm by Bob
» The Third
Wed Aug 20, 2008 5:52 pm by Bob
» The Excuse Game!
Mon Aug 18, 2008 6:25 pm by Bob
» the server as died? Oo
Mon Jul 28, 2008 6:18 pm by Bob