Visual Basics 6 Tutorial *making your form open other forms*

Post here about scripting and programming for HaloPC (audio, network, ai, etc.)
Post Reply
Cheech|N|Chong





Posts: 115
Joined: Fri Jan 14, 2005 9:26 am
Location: Why The Fuck Would I Tell You? Indiana...
Contact:

Visual Basics 6 Tutorial *making your form open other forms*

Post by Cheech|N|Chong »

This is my first tutorial with VB:

Purpose:
To teach you how to make your program open another form you have made with a command button


Ok lets start!
1.First make your form and name it whatever your little heart desires, add a caption, and so forth.
2. Create a Command Button and place it somewhere on the form, for the Command button edit the caption to "Open The Other Form":

Image

Image

3. Now its time to create a new form inside of the main form:
Image

After you click Add Form a window will appear asking you what type of form you want to add. Under the tab "New" Click "Form" and then "Open"

Image

After this, a new blank form will appear.

4. At this time you don't need to put anything on it because i'm not making a tutorial on making a program just how to open seperate forms, so you can leave the new form blank.

5. Name the NEW form "frmTwo" without the parenthesis.

Image

6. Now go back to the main form by double clicking in the form panel:

Image

7. Now double click on the command button you made with the caption "Open The Other Form" and type this:

Code: Select all

frmTwo.Show
Ok, right here frmTwo is the name of the second form you made (look back at step 5 if in doubt) the ".Show" procedure tells the program to do exactly that, SHOW frmTwo.
[/color][/b]
This conclused my tutorial hope you guys who didn't know how to do this now do, thank you.
Signature exceeded 75KB.
User avatar
Locke




Socialist Advisor Translator

Posts: 2225
Joined: Fri Aug 06, 2004 1:42 am
Location: Woot.com
Contact:

Post by Locke »

Nice tut
*Sticky

Or you could use the command

Code: Select all

form2.visible = true
They both work though
Image
Feel free to send me an instant message if you need anything.
Cheech|N|Chong





Posts: 115
Joined: Fri Jan 14, 2005 9:26 am
Location: Why The Fuck Would I Tell You? Indiana...
Contact:

Post by Cheech|N|Chong »

bwahaha my first little sticky, thanks! 8)
Signature exceeded 75KB.
Thebirthdayhat





Posts: 94
Joined: Mon Nov 15, 2004 7:01 pm
Location: over there

Post by Thebirthdayhat »

nice tut, btw how did u get the curser in the screenshot?
Signature exceeded 3 lines of text.
Cheech|N|Chong





Posts: 115
Joined: Fri Jan 14, 2005 9:26 am
Location: Why The Fuck Would I Tell You? Indiana...
Contact:

Post by Cheech|N|Chong »

Thebirthdayhat wrote:nice tut, btw how did u get the curser in the screenshot?
uhh...didnt disable it on my SS program?
Signature exceeded 75KB.
User avatar
Phenomena





Posts: 1510
Joined: Thu Jul 01, 2004 3:25 pm
Location: Training my ducks
Contact:

Post by Phenomena »

or you can use

Code: Select all

Load frmTwo
thats the way i like to do
Image
And if they don't accept Jesus as their Personal Savior, you can kill them later. How cool is that!
User avatar
Ironahand08





Posts: 154
Joined: Thu Feb 26, 2004 4:52 pm
Location: Blood Gulch Outpost Number 1
Contact:

Post by Ironahand08 »

I think it is Visual Basic, not Visual Basics
Post Reply