Find all our projects in development below.
All source code is GNU General Public License (GPL)
Browsing MainForm.frm (5.49 KB)
VERSION 5.00
Begin VB.Form MainForm
BorderStyle = 1 'Fixed Single
Caption = "List Stealer"
ClientHeight = 4110
ClientLeft = 45
ClientTop = 435
ClientWidth = 6045
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Icon = "MainForm.frx":0000
MaxButton = 0 'False
ScaleHeight = 4110
ScaleWidth = 6045
StartUpPosition = 2 'CenterScreen
Begin VB.Timer HotkeyTimer
Enabled = 0 'False
Interval = 200
Left = 0
Top = 0
End
Begin VB.Frame Frame2
Caption = "List Items"
Height = 2895
Left = 120
TabIndex = 1
Top = 1080
Width = 5775
Begin VB.TextBox txtList
Height = 2295
Left = 240
Locked = -1 'True
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 3
Top = 360
Width = 5295
End
End
Begin VB.Frame Frame1
Caption = "Window Handle"
Height = 855
Left = 120
TabIndex = 0
Top = 120
Width = 5775
Begin VB.CommandButton CmdCapture
Caption = "..."
Height = 255
Left = 5160
TabIndex = 4
Top = 360
Width = 375
End
Begin VB.TextBox txtWnd
Height = 315
Left = 240
MaxLength = 9
TabIndex = 2
Top = 360
Width = 4815
End
End
End
Attribute VB_Name = "MainForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Declare Function SendMessageLong Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Declare Function SendMessageByString Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As Long
Private Declare Function WindowFromPoint Lib "user32" (ByVal xPoint As Long, ByVal yPoint As Long) As Long
Private Type POINTAPI
X As Long
Y As Long
End Type
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Const GWL_STYLE = (-16)
Private Const ES_NUMBER = &H2000
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Const KS_KEYDOWN = &H8001
Dim LastWnd As Long
Public Sub NumbersOnlyTextBox(hWnd As Long)
SetWindowLong hWnd, GWL_STYLE, GetWindowLong(hWnd, GWL_STYLE) Xor ES_NUMBER
End Sub
Private Sub CmdCapture_Click()
HotkeyTimer.Enabled = Not HotkeyTimer.Enabled
txtWnd.Enabled = Not HotkeyTimer.Enabled
End Sub
Private Sub Form_Load()
NumbersOnlyTextBox txtWnd.hWnd
End Sub
Private Sub HotkeyTimer_Timer()
Dim CPos As POINTAPI
Dim Wnd As Long
GetCursorPos CPos
Wnd = WindowFromPoint(CPos.X, CPos.Y)
If Wnd <> LastWnd Then
DrawWindowBorder Wnd
DrawWindowBorder LastWnd
LastWnd = Wnd
End If
If GetAsyncKeyState(vbKeyF12) = KS_KEYDOWN Then
DrawWindowBorder Wnd
HotkeyTimer.Enabled = False
txtWnd.Enabled = True
txtWnd.Text = Wnd
End If
End Sub
Private Sub txtWnd_Change()
Dim lngListBox As Long
Dim lngListCount As Long
Dim lngListIndex As Long
Dim bAltMethod As Boolean
Dim strListitem As String
If Val(txtWnd.Text) > 0 Then
txtList.Text = ""
lngListBox = Val(txtWnd.Text)
lngListCount = SendMessageLong(lngListBox, &H18B, 0, 0)
If lngListCount = 0 Then
lngListCount = SendMessageLong(lngListBox, &H146, 0, 0)
bAltMethod = True
End If
For lngListIndex = 0 To lngListCount - 1
strListitem = String(512, Chr(0))
If bAltMethod = False Then
SendMessageByString lngListBox, &H189, lngListIndex, strListitem
If InStr(strListitem, Chr(0)) Then strListitem = Left(strListitem, InStr(strListitem, Chr(0)) - 1)
If strListitem <> "" Then txtList.Text = txtList.Text + strListitem + vbCrLf
Else
SendMessageByString lngListBox, &H148, lngListIndex, strListitem
If InStr(strListitem, Chr(0)) Then strListitem = Left(strListitem, InStr(strListitem, Chr(0)) - 1)
If strListitem <> "" Then txtList.Text = txtList.Text + strListitem + vbCrLf
End If
Next lngListIndex
End If
End Sub
Private Sub txtWnd_LostFocus()
txtWnd.Text = Val(txtWnd.Text)
End Sub