How To...1. Make a Message Box
2. Make a Menu
3. Force Loading
4. Freeze Variables
5. Freeze Variables With On / Off
6. Make your Project into EXE file
1. How to Make a Message BoxIf you want to make a message box, the code is very easy and simple you could type these code in a button or a menu bar
- Code:
-
MsgBox "Message Here", vbOkOnly, "Title"
2. How to make a MenuTo make one, right-click a blank spot on your form, and then go to 'Menu Editor'.
Or you can make a sub menu by clicking "--->" right arrow
3. Force Loading To make a force load button its really easy all you got to do is double click on the button and put in these code!
- Code:
-
ShockwaveFlash1.Playing = True
This tells the shockwave flash component to play the .swf when the form is loaded.
4. How to Freeze VariablesFreezing a variable can be useful when you want to freeze the variable for health, money, etc... This way, the value will never change, so in the game we usually call it infinite.
First you need to Set up a button and a timer. The timer should look like this:
Now on the right, click the properties window, and change the interval of the timer from 0 to 1. And make sure to change Enabled to False
Now double click the timer
And enter this code:
- Code:
-
Call ShockwaveFlash1.Setvariable("variable", value)
OR
- Code:
-
Call ShockwaveFlash1.SetVariable("variable", Text1.Text)
Now double click on your command button and put in these code:
- Code:
-
Timer1.Enabled = True
This turns the timer on when pressed.
5. How to Freeze Variables With On / OffFirstly, set up your button and timer the same as above, and enter your timer code, but for your button, use this instead:
- Code:
-
If Timer1.Enabled = False Then
Timer1.Enabled = True
Else
Timer1.Enabled = False
End If
If you want to change your button name(caption) to on or off when pressed all you got to do is add 2 more line:
- Code:
-
If Timer1.Enabled = False Then
Timer1.Enabled = True
Command1.Caption = "[Name of the caption]: On"
Else
Timer1.Enabled = False
Command1.Caption = "[Name of the caption]: Off"
End If
Replace the [Name of the caption] to the name off your caption
E.G:
Infinite health: On
Infinite health: Off
6. How to make your Project into EXE fileThis is very simple but some of the people had just start to make trainers or other program or new to Visual Basic 6 so maybe they don't know how to make a Project they made into EXE file...
Just go to
File> Make Project1.exe
I will be adding more later!
PS: There is alot I don't know yet...