Thread: [visualBasic6] tutorial-Making a messagebox

View Single Post

  #1 (permalink)  

Old 03-03-2005, 08:20 AM

[visualBasic6] tutorial-Making a messagebox

Hey everyone, I'm going to teach you how to make a simple vb program.
Excuse me if this isnt the best tutorial, Im at school and I can't remember coding very well.
Step one- Make two command buttons, click on one, and change the 'caption' to Button one, and the other button two.
Step Two- Click on your form, change the caption to whatever you want the title to be.
Step Three- Double click on a button, and then type in

Code:
Dim press
press = MsgBox("You pressed button one!",65,"Title")
Change the word 'title' to whatever the title of your form you want it to be, and "you pressed button..." to whatever you want the message to say.
Now, repeat the same thing with button 2, except change
Code:
Dim Press
to
Code:
dim press2
and the other press to press 2.
To view your program in action, click run>Start and click one of the buttons!
To make your program an exe, go to file>make project1.exe

Thankee

And another feature that you could use is
Code:
<html>
<body>
<script type="text/vbscript">
Dim press
press = MsgBox("You pressed button one!",65,"Title")
</script>
</body>
</html>
Which makes a pop-up on your webpage, not of much use though.

Last edited by Chrisw; 03-03-2005 at 08:41 AM.
[ reply ]
Chrisw

Chrisw is offline registered.

Chrisw's Avatar

Join Date: Feb 2005

Posts: 35