Here I will put together many tutorials for many things. I will keep adding to this list every day. Each tutorial will be on a different page.
Index:
Post 2 - Enable and Disable CTRL + ALT + DEL
Post 3 - A list of Key Codes and How to Use Them
Post 4 - How to Create a Password Generator
Post 5 - Launching a Website Url in VB6
Post 6 - Making a Port Scanner
Post 7 - Changing your Background Color
Post 8 - Auto Refresher
Post 9 - Serial Protection
Post 10 - Allow Only One Instance of Your Program Running
Post 11 - IP Pinger
Post 12 - Lock out Screen
Post 13 - Yes/No Option
Post 14 - Making a Transparent Form
Post 15 - Making a Clock
Post 16 - Making a Editable List Box
Post 24 - Process Hider
Post 26 - How to use a scroll bar
Post 36 - Writing to the memory of a game Posted By- Macka
Post 37 - Login to a Website In VB6
Post 40 - Add on to password Generator by Posted By - vinesh123
Post 41 - Auto Clicker Posted By - vinesh123
Post 42 - Auto Typer Posted By - vinesh123
Post 48 - Visual Basic 6.0 Flash Game Trainer Maker - ext3m Haxor
Many more tutorials will be added, I will keep on adding tutorials, if you would like to request a tutorial please PM me
If you need any help or I made a typo on my tutorials then feel free to pm me or to email me at: [Only registered and activated users can see links. ]
Thanks are Always Nice
Feel free to post tuts here too
Declare Function SystemParametersInfo Lib "user32" Alias _
"SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, _
ByVal lpvParam As Any, ByVal fuWinIni As Long) As Long
Insert this into your form:
Code:
Sub DisableCtrlAltDelete(bDisabled As Boolean)
Dim x As Long
x = SystemParametersInfo(97, bDisabled, CStr(1), 0)
End Sub
Private Sub Command2_Click()
DisableCtrlAltDelete (False)
End Sub
Private Sub Command1_Click()
DisableCtrlAltDelete (True)
End Sub
vbKeyControl 'CTRL Key
vbkeymenu 'ALT key
vbKeyReturn 'Enter Key (Main)
vbKeyBack 'Back Space
vbKeyTab 'Tab
vbKeyShift 'Shift
vbKeyCapital 'Caps Lock
vbKeyEscape 'Esc
vbKeySpace ' Space Bar
vbKeyPageUp ' Page Up
vbKeyPageDown ' Page Down
vbKeyEnd 'End
vbKeyHome ' Home
vbKeyLeft 'Left arrow
vbKeyUp 'Up arrow
vbKeyRight 'Right Arrow
vbKeyDown ' Down Arrow
vbKeyPrint 'Print Screen
vbKeyPause 'Pause (The one next to printscreen)
vbKeyInsert 'Insert
vbKeyDelete 'Delete (the one near insert)
vbKeyHelp 'Help
vbKeyNumlock ' Numlock
vbKeyF1 'F1
vbKeyF2 'F2
vbKeyF3 'F3
vbKeyF4 'F4
vbKeyF5 'F5
vbKeyF6 'F6
vbKeyF7 'F7
vbKeyF8 'F8
vbKeyF9 'F9
vbKeyF10 'F10
vbKeyF11 'F11
vbKeyF12 'F12
vbKeyZ 'Z
vbKeyx 'X
vbKeyc 'C
vbKeyv 'V
vbKeyb 'B
vbKeyn 'N
vbKeym 'M
vbKeya 'A
vbKeys 'S
vbKeyd ' D
vbKeyf 'F
vbKeyg 'G
vbKeyh 'H
vbKeyj 'J
vbKeyk 'K
vbKeyl 'L
vbKeyq 'Q
vbKeyw 'W
vbKeye 'E
vbKeyr 'R
vbKeyt 'T
vbKeyy 'Y
vbKeyu 'U
vbKeyi 'I
vbKeyo 'O
vbKeyp 'P
vbKeyNumpad0 'Num Pad 0
vbKeyNumpad1 'Num Pad 1
vbKeyNumpad2 'Num Pad 2
vbKeyNumpad3 'Num Pad 3
vbKeyNumpad4 'Num Pad 4
vbKeyNumpad5 'Num Pad 5
vbKeyNumpad6 'Num Pad 6
vbKeyNumpad7 ' Num Pad 7
vbKeyNumpad8 'NumPad 8
vbKeyNumpad9 'Num Pad 9
vbKeyMultiply 'Num Pad *
vbKeyAdd 'Num Pad +
vbKeySubtract 'Num Pad -
vbKeyDivide 'Num Pad /
vbKeySeparator 'Num Pad Enter
vbKeyDecimal 'Num Pad .
vbKey0 'Normal 0 from top of keyboard
vbKey1 'Normal 1 from top of keyboard
vbKey2 'Normal 2 from top of keyboard
vbKey3 'Normal 3 from top of keyboard
vbKey4 'Normal 4 from top of keyboard
vbKey5 'Normal 5 from top of keyboard
vbKey6 'Normal 6 from top ofkeybaorrd
vbKey7 'Normal 7 from top of keyboard
vbKey8 'Normal 8 from top of keybaord
vbKey9 'Normal 9 from top of keyboard
-------------------------------------
Heres how to use them:
Code:
Private Sub Form_KeyDown(KeyCode As Integer, Shift _
As Integer)
If KeyCode = vbKeyBack Then
MsgBox " You pushed backSpace" 'That is changed to what _
you want it to do when they push it
End If 'Remember for every If you must have a end if
End Sub
Now For the mouse Buttons:
vbKeyLButton 'Left mouse Button
vbKeyRButton 'Right Mouse Button
vbKeyMButton 'Middle mouse Button
And to use them its a bit different
Code:
Private Sub Form_MouseDown(Button As Integer, Shift _
As Integer, X As Single, Y As Single)
If Button = vbKeyLButton Then
MsgBox " You pushed the left mouse button" 'The code _
you want it to do goes there
End If ' remember for every If you need End If
End Sub
Create a text box and command button.
Add this code to your form:
Code:
Private Sub Command1_Click()
Text1 = GenerateCode() 'make sure ur textbox is called Text1
End Sub
Public Function GenerateCode()
strInputString = "1234567890abcdefghijklmnopqrstuvwxyz" 'these are the characters which will be in the password
intLength = Len(strInputString)
intNameLength = 7 'edit this according to how long u want ur password to be
Randomize ' jus to make it random :D
strName = ""
For intStep = 1 To intNameLength
intRnd = Int((intLength * Rnd) + 1)
strName = strName & Mid(strInputString, intRnd, 1)
Next
GenerateCode = strName
End Function
This is how to launch a site you enter specifically O the user enters.. using their default browser.
Add this code to your command button that you want if you click on it, it'll launch the website url:
Add 2 text boxes, 3 command buttons, a list box, a timer, and a winsock control (if you dont have the winsock button on your component bar, you can add it by right clicking on the bar and scrolling to components, and adding it from the component list, it should be called "Microsoft Winsock Control 6.0 (SP6))
Add the following code to your form:
Code:
Private Sub Form_Load()
Timer1.Interval = 1
Timer1.Enabled = False
Text2.Text = "0"
End Sub
Private Sub Timer1_Timer()
On Error Resume Next
Winsock1.Close
Text2.Text = Text2.Text + 1
Winsock1.RemoteHost = Text1.Text
Winsock1.RemotePort = Text2.Text
Winsock1.Connect
End Sub
Private Sub Command1_Click()
Timer1.Enabled = True
End Sub
Private Sub Command2_Click()
Timer1.Enabled = False
Text2.Text = "0"
End Sub
Private Sub Command3_Click()
List1.Clear
End Sub
Private Sub Winsock1_Connect()
List1.AddItem Winsock1.RemotePort & " is open!"
End Sub
As you can see your first command button is to start the scan, the second is to stop the scan, and the third one is to clear the ports.
First add a check box.
Then add this to your text box:
Code:
Private Sub check1_Click()
If check1 = 1 Then
Form1.Check1.BackColor = vbRed 'this will change the color of the check box to red
Form1.BackColor = vbRed 'this will change the color of the form to red
ElseIf Check1 = 0 Then
Form1.Check1.BackColor = vbBlue 'this will change the color of the check box to blue
Form1.BackColor = vbBlue 'this will change the color of the form to blue
End If
End Sub
Add a command button and a Inet Control
Add this to your command button:
Code:
Private Sub Command1_Click()
Dim x As Long
For x = 1 To 1000
Inet.OpenURL "www.yourwebsitethatyouwanttorefresh.com"
Do While Inet.StillExecuting = True
DoEvents ' lets wait til the connection/loading has finished
'not needed for only a few connections
Loop
Next x
End Sub
This is a good program to make your website hits go up
You will need::
1 Textbox
1 Command Button
-----------------------------
(this is to get the serial)
Add this coding to Command1
Code:
Private Sub Command1_Click()
Dim serial As String
serial = VolumeSerialNumber("C:\")
Text1.Text = serial
End Sub
Code:
Private Sub Form_Load()
Dim serial As String
serial = VolumeSerialNumber("C:\")
If serial = "0000-0000" Then 'use the serial finder and then put the serial you get here or it will not open
Form1.Show
Else
MsgBox "Sorry but you do not have permission to open this program"
End
End If
End Sub
Add this module to both the serial finder and prog u want protected::
Code:
Public Function VolumeSerialNumber(ByVal RootPath As String) As String
Public Declare Function GetVolumeSerialNumber Lib "kernel32" Alias "GetVolumeInformationA" (ByVal lpRootPathName As String, ByVal lpVolumeNameBuffer As String, ByVal nVolumeNameSize As Long, lpVolumeSerialNumber As Long, lpMaximumComponentLength As Long, lpFileSystemFlags As Long, ByVal lpFileSystemNameBuffer As String, ByVal nFileSystemNameSize As Long) As Long
Dim VolLabel As String
Dim VolSize As Long
Dim serial As Long
Dim MaxLen As Long
Dim Flags As Long
Dim Name As String
Dim NameSize As Long
Dim s As String
If GetVolumeSerialNumber(RootPath, VolLabel, VolSize, serial, MaxLen, Flags, Name, NameSize) Then
s = Format(Hex(serial), "00000000")
VolumeSerialNumber = Left(s, 4) + "-" + Right(s, 4)
Else
VolumeSerialNumber = "0000-0000"
End if
End Function
Now after you have added the module to serial finder run it and push the
command , now your serial should be in the text box, copy it and replace
0000-0000 in the form load and now it should work.