?? frmmain.frm
字號:
VERSION 5.00
Begin VB.Form frmMain
BorderStyle = 1 'Fixed Single
Caption = "密碼查看器"
ClientHeight = 3030
ClientLeft = 45
ClientTop = 330
ClientWidth = 5550
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
ScaleHeight = 202
ScaleMode = 3 'Pixel
ScaleWidth = 370
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox PasswordText
Height = 270
Left = 1920
TabIndex = 5
Top = 2400
Width = 3255
End
Begin VB.TextBox WndClassText
Height = 270
Left = 1920
TabIndex = 4
Top = 1920
Width = 3255
End
Begin VB.TextBox hWndText
Height = 270
Left = 1920
TabIndex = 3
Top = 1440
Width = 3255
End
Begin VB.TextBox PointText
Height = 270
Left = 1920
TabIndex = 2
Top = 960
Width = 3255
End
Begin VB.PictureBox Picture1
AutoSize = -1 'True
Height = 540
Left = 1920
Picture = "frmMain.frx":0000
ScaleHeight = 480
ScaleWidth = 480
TabIndex = 1
ToolTipText = "http://hota.at.china.com"
Top = 120
Width = 540
End
Begin VB.CheckBox Check1
Caption = "總在最上面"
Height = 255
Left = 240
TabIndex = 0
Top = 240
Width = 1335
End
Begin VB.Label Label2
Caption = "請拖動眼睛圖標到顯示 '***' 的密碼窗口"
ForeColor = &H00000080&
Height = 660
Left = 3000
TabIndex = 10
Top = 120
Width = 1575
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "密碼文本:"
Height = 180
Index = 3
Left = 240
TabIndex = 9
Top = 2400
Width = 900
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "鼠標所在窗口句柄:"
Height = 180
Index = 2
Left = 240
TabIndex = 8
Top = 1440
Width = 1620
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "鼠標坐標值:"
Height = 180
Index = 1
Left = 240
TabIndex = 7
Top = 960
Width = 1080
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "獲得窗口類型:"
Height = 180
Index = 0
Left = 240
TabIndex = 6
Top = 1920
Width = 1260
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim IsDragging As Boolean
Private Sub SetOnTop(ByVal IsOnTop As Integer)
Dim rtn As Long
If IsOnTop = 1 Then
'將窗口置于最上面
rtn = SetWindowPos(frmMain.hwnd, -1, 0, 0, 0, 0, 3)
Else
rtn = SetWindowPos(frmMain.hwnd, -2, 0, 0, 0, 0, 3)
End If
End Sub
Private Sub Check1_Click()
SetOnTop (Check1.Value)
End Sub
Private Sub Form_Load()
Check1.Value = 1
SetOnTop (Check1.Value)
IsDragging = False
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
If IsDragging = True Then
Dim rtn As Long, curwnd As Long
Dim tempstr As String
Dim strlong As Long
Dim point As POINTAPI
point.x = x
point.y = y
'將客戶坐標轉化為屏幕坐標并顯示在PointText文本框中
If ClientToScreen(frmMain.hwnd, point) = 0 Then Exit Sub
PointText.Text = Str(point.x) + "," + Str(point.y)
'獲得鼠標所在的窗口句柄并顯示在hWndText文本框中
curwnd = WindowFromPoint(point.x, point.y)
hWndText.Text = Str(curwnd)
'獲得該窗口的類型并顯示在WndClassText文本框中
tempstr = Space(255)
strlong = Len(tempstr)
rtn = GetClassName(curwnd, tempstr, strlong)
If rtn = 0 Then Exit Sub
tempstr = Trim(tempstr)
WndClassText.Text = tempstr
'向該窗口發送一個WM_GETTEXT消息,以獲得該窗口的文本,并顯示在PasswordText文本框中
tempstr = Space(255)
strlong = Len(tempstr)
rtn = SendMessage(curwnd, WM_GETTEXT, strlong, tempstr)
tempstr = Trim(tempstr)
PasswordText.Text = tempstr
End If
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
If IsDragging = True Then
Screen.MousePointer = vbDefault
IsDragging = False
'釋放鼠標消息抓取
ReleaseCapture
End If
End Sub
Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
If IsDragging = False Then
IsDragging = True
Screen.MouseIcon = LoadPicture(App.Path + "\Eye.ico")
Screen.MousePointer = vbCustom
'將以后的鼠標輸入消息都發送到本程序窗口
SetCapture (frmMain.hwnd)
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -