First open up VB, and create a new stand form.
name is Program, and change the caption to "Commonly Used Programs", in the properties box for the form. Now click the image icon and drag it over the form:
In the properties box go down to "picture and select an image that you want. Adjust the size of the image box to fit the image. Keep doing the image icon until you have all the programs you want to have an image on it:
If you have a lot of programs start doing the others in checkboxes instead of images. I recommend only putting like game images, not diff programs like Photoshop:
Create Command Button, and change the caption to "launch!" (see the image above).
Double Click the Command Button and write the code you want.
This is my code:
Code: Select all
Private Sub Command1_Click()
Dim cs As String
Dim p2p As String
Dim lime As String
Dim max As String
Dim ds As String
Dim aware As String
Dim spy As String
Dim mech As String
Dim priv As String
cs = Check1.Value
p2p = Check2.Value
lime = Check3.Value
max = Check4.Value
ds = Check5.Value
aware = Check6.Value
spy = Check7.Value
mech = Check8.Value
priv = Check9.Value
If cs = True Then Shell "C:\Program Files\Adobe\Photoshop CS\Photoshop.exe"
If p2p = True Then Shell "C:\Program Files\Warez P2P Client\warez.exe"
If lime = True Then Shell "C:\Program Files\LimeWire\LimeWire.exe"
If max = True Then Shell "C:\Program Files\SWiSHmax\SwishMax.exe"
If ds = True Then Shell "C:\3dsmax7\3dsmax.exe"
If aware = True Then Shell "C:\Program Files\Lavasoft\Ad-Aware SE Professional\Ad-Aware.exe"
If spy = True Then Shell "C:\Program Files\Spybot - Search & Destroy\SpybotSD.exe"
If mech = True Then Shell "C:\Program Files\Registry Mechanic\RegMech.exe"
If priv = True Then Shell "C:\Program Files\Privacy Guardian\pg.exe"
Ok the dim parts states that we want to use the syntex written after 'dim' to specify one of the images we put it, or the textboxes. Example: 'dim cs as string' cs is photoshop cs so instead of typing photoshop cs when we code later we'll type cs instead for shorter. Of course the program doesn't know what 'cs' is so we write this after all the 'dims':
Code: Select all
cs = Check1.Value
This tells the program that cs is check1.value which is the name of my checkbox that I caption 'Photoshop CS' Do the same for the rest. The next coding is telling the program what to do if one of the checkboxes is checked.
Example: (If cs = True Then Shell "C:\Program Files\Adobe\Photoshop CS\Photoshop.exe")
This tells the program that if cs (check1.value) is 'True' (in other words is checked), to open "C:\Program Files\Adobe\Photoshop CS\Photoshop.exe" which is where my Photoshop CS is located. The ''Then Shell "C:\Program Files\Adobe\Photoshop CS\Photoshop.exe" Tells the program if check1.value is true 'THEN' open Photoshop CS at the following directory (C:\Program Files\Adobe\Photoshop CS\Photoshop.exe). The shell command just tells it that you want the program to open a file from your computer, then you type the directory of the program.
Ok for the image files: Double click them and code it but make needed changes to fit your program directory:
This is my code:
Code: Select all
Private Sub Picture2_Click()
Shell "C:\Program Files\Microsoft Games\Halo\halo.exe"
End Sub
This tells the program to open 'C:\Program Files\Microsoft Games\Halo\halo.exe'.
This is the code to my other image:
Code: Select all
Private Sub Picture1_Click()
Shell "C:\Program Files\Red Storm Entertainment\RavenShield\system\RavenShield.exe"
End Sub
This again tells the program to open 'C:\Program Files\Red Storm Entertainment\RavenShield\system\RavenShield.exe'. Just click the image and you will launch the program. For the checkboxes you will need to check them first then click the command button to launch the file.
The code above: Example: 'shell HardDriveLetter\Folder\OtherFolder\Filename.exe'
If you have any problems email me at
king___2004@sbcglobal.net
Other than that hope you enjoyed this tutorial!