📄 fmrproperty.frm
字号:
End
Begin VB.Label lblCWinBytes
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Window Bytes:"
Height = 195
Left = 180
TabIndex = 65
Top = 1260
Width = 1065
End
Begin VB.Label lblCBytes
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Class Bytes:"
Height = 195
Left = 180
TabIndex = 63
Top = 960
Width = 855
End
Begin VB.Label lblCWNDPROC
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Class WNDPROC:"
Height = 195
Left = 180
TabIndex = 61
Top = 660
Width = 1320
End
Begin VB.Label lblClassName
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Class Name:"
Height = 195
Left = 180
TabIndex = 58
Top = 360
Width = 885
End
End
Begin VB.CommandButton cmdRefresh
Caption = "&Refresh"
Height = 555
Left = 720
TabIndex = 22
Top = 4200
Width = 2235
End
Begin VB.CommandButton cmdNexts
Caption = "&Next --->"
Height = 555
Left = 5400
TabIndex = 1
Top = 4200
Width = 2235
End
Begin VB.CommandButton cmdBack
Caption = "<-- &Back"
Height = 555
Left = 3060
TabIndex = 0
Top = 4200
Width = 2235
End
Begin MSComctlLib.TabStrip Tabs
Height = 3915
Left = 120
TabIndex = 2
Top = 120
Width = 7515
_ExtentX = 13256
_ExtentY = 6906
TabMinWidth = 1058
_Version = 393216
BeginProperty Tabs {1EFB6598-857C-11D1-B16A-00C0F0283628}
NumTabs = 1
BeginProperty Tab1 {1EFB659A-857C-11D1-B16A-00C0F0283628}
ImageVarType = 2
EndProperty
EndProperty
End
End
Attribute VB_Name = "frmProperty"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'
' I have been to great troubles to learn all of the techniques in this program.
' I have spent many, many hours and late nights coding the many functions which I
' have included. As much as I resent it, Planet Source Code requires that I put
' the source code in the zip file. So I have placed it in here for you to view.
' Please use it wisely. And give me credit for all of the hard work that I have
' done. My biggest fear is that somebody will do an almost straight rip of this
' code, and take the credit for themselves. Please do not let this happening. I'm
' placing a lot of trust there. So please, use this program, use this code, and
' give me credit for it. If anybody rips all my routines, then my secret spy's
' (and I have a lot of them, as soon as I hire them) will tell me, and I'll get
' into my private jet (as soon as I buy it) and track you down over the whole
' world and eventually KILL YOU. You get the idea? Thanks. Read on for something
' a little more interesting!
'
' Code is Copyright Jolyon Bloomfield, February 2000
'
Private Declare Function DrawIcon Lib "user32" (ByVal hdc As Long, ByVal X As Long, ByVal Y As Long, ByVal hIcon As Long) As Long
Private myLookHwnd As Long
Private CurrentTab
Private Sub cmdBack_Click()
'Me.Hide
frmSelect.Show
frmSelect.WindowState = 0
'frmSelect.cmdEnum.Value = True
End Sub
Private Sub cmdNext_Click(Index As Integer)
Dim Worker As Enumerator
Set Worker = New Enumerator
Dim TemphWnd As Long
TemphWnd = Worker.GetRelWindow(LookHwnd, Index)
If TemphWnd = &H0 Then
MsgBox "No related window found.", vbInformation, "Windowit"
Else
LookHwnd = TemphWnd
End If
End Sub
Private Sub cmdNexts_Click()
'Me.Hide
frmEdit.LookHwnd = Me.LookHwnd
frmEdit.DoStuph
End Sub
Private Sub cmdParent_Click()
Dim Worker As Enumerator
Set Worker = New Enumerator
Dim TemphWnd As Long
TemphWnd = Worker.ParentWind(LookHwnd)
If TemphWnd = &H0 Then
MsgBox "No related window found.", vbInformation, "Windowit"
Else
LookHwnd = TemphWnd
End If
End Sub
Private Sub cmdRefresh_Click()
ClearAll
End Sub
Private Sub cmdShowSpace_Click()
Dim Temp As String
Me.Enabled = False
Temp = Me.Caption
Me.Caption = Me.Caption & " Press ESC to return"
frmShowWind.DoStuph LookHwnd
Me.Caption = Temp
Me.Enabled = True
End Sub
Private Sub Form_Load()
Dim i As Integer
Tabs.Tabs.Clear
For i = 0 To frameTabs.Count - 1
Tabs.Tabs.Add i + 1, , frameTabs(i).Caption
Next i
For i = 0 To frameTabs.Count - 1
With frameTabs(i)
.Move Tabs.ClientLeft, Tabs.ClientTop, Tabs.ClientWidth, Tabs.ClientHeight
.Visible = False
.BorderStyle = 0
End With
Next i
' Make Tab 1 active and its Frame visible.
CurrentTab = 1
Set Tabs.SelectedItem = Tabs.Tabs(CurrentTab)
frameTabs(CurrentTab - 1).Visible = True
frameTabs(CurrentTab - 1).ZOrder
End Sub
Private Sub Form_Unload(Cancel As Integer)
Dim i As Form
For Each i In Forms
If i.Name = "frmMouseSelect" Then
Unload i
ElseIf i.Visible = False Then
Unload i
End If
Next i
End Sub
Private Sub lstHeirachy_DblClick()
LookHwnd = Me.lstHeirachy.ItemData(Me.lstHeirachy.ListIndex)
frmEdit.LookHwnd = Me.LookHwnd
End Sub
Private Sub Tabs_Click()
If Tabs.SelectedItem.Index = CurrentTab Then Exit Sub
Dim i As Integer
For i = 0 To frameTabs.Count - 1
frameTabs(i).Visible = False
Next i
frameTabs(Tabs.SelectedItem.Index - 1).Visible = True
frameTabs(Tabs.SelectedItem.Index - 1).ZOrder
CurrentTab = Tabs.SelectedItem.Index
End Sub
Public Property Get LookHwnd() As Long
LookHwnd = myLookHwnd
End Property
Public Property Let LookHwnd(ByVal vNewValue As Long)
Dim Worker As Enumerator
Set Worker = New Enumerator
If Worker.IsValidWindow(vNewValue) = False Then Exit Property
If myLookHwnd = vNewValue Then Exit Property
myLookHwnd = vNewValue
ClearAll
frmEdit.LookHwnd = myLookHwnd
End Property
Private Sub ClearAll()
Dim Enumit As Enumerator
Set Enumit = New Enumerator
Dim Temp As Long
With Me
.txthWnd = Hex(.LookHwnd)
.txtClass = Enumit.ClassName(.LookHwnd)
.lstHeirachy.Clear
.txtThreadID.Text = Hex(Enumit.WindThread(.LookHwnd))
.txtProcessID.Text = Hex(Enumit.WindProcess(.LookHwnd))
.txtProcessName.Text = Enumit.ProcessName(Enumit.WindProcess(.LookHwnd))
.chkEnabled.Value = Abs(Enumit.IsEnabled(.LookHwnd))
.chkVisible.Value = Abs(Enumit.IsVisible(.LookHwnd))
.chkOnTop.Value = Abs(Enumit.IsOnTop(.LookHwnd))
.txtCaption.Text = Enumit.GetWindText(.LookHwnd)
End With
Dim Use As RECT
Dim Ender As RECT
Dim Pointer As POINTAPI
Dim WorkerText As String
Dim XIncrement As Long
Dim YIncrement As Long
' Get the Client Rectangles
Use = modConst.GetClientRects(LookHwnd)
Ender = modConst.GetWindowRects(LookHwnd)
With Use
' Sort out the correct Client co-ordiantes, according to the parent.
Pointer.X = Use.Left
Pointer.Y = Use.Top
Pointer = modConst.ClientToScreen(LookHwnd, Pointer)
XIncrement = Pointer.X - Ender.Left
YIncrement = Pointer.Y - Ender.Top
WorkerText = "(" & Trim(Str(.Left + XIncrement)) & ", " & Trim(Str(.Top + YIncrement)) & ")-(" & Trim(Str(.Right + XIncrement)) & ", " & Trim(Str(.Bottom + YIncrement)) & ")"
' Display them
Me.txtClientRect(0).Text = WorkerText
' The client Size
Me.txtClientRect(1).Text = Trim(Str(.Right - .Left)) & " x " & Trim(Str(.Bottom - .Top))
End With
' Put the Window Rectangle Co-ordinates in the text boxes
Use = modConst.GetWindowRects(LookHwnd)
With Use
Me.txtWindRect(0).Text = "(" & Trim(Str(.Left)) & ", " & Trim(Str(.Top)) & ")-(" & Trim(Str(.Right)) & ", " & Trim(Str(.Bottom)) & ")"
Me.txtWindRect(1).Text = Trim(Str(.Right - .Left)) & " x " & Trim(Str(.Bottom - .Top))
End With
Dim OldParent As Long
Dim Parent As Long
Parent = Me.LookHwnd
Do While Parent
Me.lstHeirachy.AddItem Hex(Parent) & ", " & Enumit.ClassName(Parent)
Me.lstHeirachy.ItemData(Me.lstHeirachy.NewIndex) = Parent
OldParent = Parent
Parent = Enumit.ParentWind(OldParent)
Loop
Me.txtMenu.Text = ""
Select Case Enumit.WindPos(Me.LookHwnd)
Case Is = EnumPos.Normal
Me.lblWndPos.Caption = "Window is Normal/Restored."
Case Is = EnumPos.Maximized
Me.lblWndPos.Caption = "Window is Maximized."
Case Is = EnumPos.Minimized
Me.lblWndPos.Caption = "Window is Minimized."
End Select
With Me
.txtControlID.Text = Enumit.GetControlID(LookHwnd)
.txtInstance.Text = Enumit.Format8(Enumit.GetHandleInstance(LookHwnd))
.txtSpechWnd.Text = Enumit.Format8(LookHwnd)
.txtUserData.Text = Enumit.Format8(Enumit.GetUserData(LookHwnd))
.txtExtWinStyle.Text = Enumit.Format8(Enumit.ExtStyleVal(LookHwnd))
.txtwndProc.Text = Enumit.Format8(Enumit.GetWndProc(LookHwnd))
.txtWinStyle.Text = Enumit.Format8(Enumit.StyleVal(LookHwnd))
.lstExtWinStyle.Clear
.lstWinStyle.Clear
End With
Call DoStyles
Call DoExtStyles
txtMenu.Text = Trim(Str(Enumit.MenuHandle(LookHwnd)))
txtClassName.Text = Enumit.ClassName(LookHwnd)
txtCBytes.Text = Enumit.GetClassExtraBytes(LookHwnd)
txtCWinBytes.Text = Enumit.GetClassExtraWndBytes(LookHwnd)
txtCWndProc.Text = Enumit.Format8(Enumit.GetClassWndProc(LookHwnd))
txtCStyle.Text = Enumit.Format8(Enumit.GetClassStyle(LookHwnd))
txtCInst.Text = Enumit.Format8(Enumit.GetClassHModule(LookHwnd))
Temp = Enumit.GetClasshBackgroundBrush(LookHwnd)
Select Case Temp
Case Is = 0
txtCBrush.Text = "(None), 0, or COLOR_SCROLLBAR"
Case Is = modConst.COLOR_ACTIVEBORDER
txtCBrush.Text = "COLOR_ACTIVEBORDER"
Case Is = modConst.COLOR_BACKGROUND
txtCBrush.Text = "COLOR_BACKGROUND"
Case Is = modConst.COLOR_ACTIVECAPTION
txtCBrush.Text = "COLOR_ACTIVECAPTION"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -