⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmedit.frm

📁 Windows超级黑客得到windows运行程序的信息,很经典的
💻 FRM
📖 第 1 页 / 共 4 页
字号:
  Me.txtWindRect(1).Text = Trim(Str(.Right - .Left)) & " x " & Trim(Str(.Bottom - .Top))
  Me.txtWndSize(0).Text = Trim(Str(.Right - .Left))
  Me.txtWndSize(1).Text = Trim(Str(.Bottom - .Top))
End With

' Get the Parent Window Rect
If Enumit.IsVisible(Enumit.ParentWind(LookHwnd)) = True Then
Use = modConst.GetWindowRects(Enumit.ParentWind(LookHwnd))
With Use
  Me.txtParentWindowRect.Text = "(" & Trim(Str(.Left)) & ", " & Trim(Str(.Top)) & ")-(" & Trim(Str(.Right)) & ", " & Trim(Str(.Bottom)) & ")"
End With
Else
Me.txtParentWindowRect.Text = "(Invisible)"
End If

' Get the Parent Client Rectangles
If Enumit.IsVisible(Enumit.ParentWind(LookHwnd)) = True Then
Use = modConst.GetClientRects(Enumit.ParentWind(LookHwnd))
Ender = modConst.GetWindowRects(Enumit.ParentWind(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(Enumit.ParentWind(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.txtParentClient.Text = WorkerText
End With
Else
Me.txtParentClient.Text = "(Invisible)"
End If

' Now calculate the window's co-ordinates in reference to it's parent's.
' Step #1. Get the window's co-ordinats, in the screen co-ordinate system.
Use = modConst.GetWindowRects(LookHwnd)
If Enumit.IsVisible(Enumit.ParentWind(LookHwnd)) = True Then
' Step #2. Get the window's parent's clinet co-ordinates, in client co-ordinates.
Ender = modConst.GetClientRects(Enumit.ParentWind(LookHwnd))
' Step #3. Convert the window's parent's client co-ordinates into screen co-ordinates
Pointer.X = Ender.Left
Pointer.Y = Ender.Top
Pointer = modConst.ClientToScreen(Enumit.ParentWind(LookHwnd), Pointer)
Ender.Top = Pointer.Y
Ender.Left = Pointer.X
Pointer.X = Ender.Right
Pointer.Y = Ender.Bottom
Pointer = modConst.ClientToScreen(Enumit.ParentWind(LookHwnd), Pointer)
Ender.Bottom = Pointer.Y
Ender.Right = Pointer.X
' Step #3. Calculate the Window's position in Parent's client co-ordinates
Dim EndResult As RECT
EndResult.Top = Use.Top - Ender.Top
EndResult.Left = Use.Left - Ender.Left
EndResult.Bottom = Use.Bottom - Use.Top + EndResult.Top
EndResult.Right = Use.Right - Use.Left + EndResult.Left
' Step #4. Display the text
With EndResult
  WorkerText = "(" & Trim(Str(.Left)) & ", " & Trim(Str(.Top)) & ")-(" & Trim(Str(.Right)) & ", " & Trim(Str(.Bottom)) & ")"
  Me.txtWindClient.Text = WorkerText
End With
' Step #5. Show the X, Y coords just calculated on the screen
Me.txtWindPos(1).Text = EndResult.Top
Me.txtWindPos(0).Text = EndResult.Left
' Step #6. Show the X, Y values for the Parent's Client
Me.txtabsParent.Text = "(" & Trim(Str(Ender.Left)) & ", " & Trim(Str(Ender.Top)) & ")"
Else
With Use
  WorkerText = "(" & Trim(Str(.Left)) & ", " & Trim(Str(.Top)) & ")-(" & Trim(Str(.Right)) & ", " & Trim(Str(.Bottom)) & ")"
  Me.txtWindClient.Text = WorkerText
End With
' Step #5. Show the X, Y coords just calculated on the screen
Me.txtWindPos(1).Text = Use.Top
Me.txtWindPos(0).Text = Use.Left
' Step #6. Show the X, Y values for the Parent's Client
Me.txtabsParent.Text = "(0, 0)"
End If

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.cmboWndPos.ListIndex = Enumit.WindPos(LookHwnd)

If Enumit.ClassName(LookHwnd) = "Edit" Then
Me.lblIsEdit.Caption = "This pane shows special controls for edit classes. This class appears to be an edit control."
Else
Me.lblIsEdit.Caption = "This pane shows special controls for edit classes. This class does not appear to be an edit control, so many of these functions will not work, although some might."
End If

Me.txtWindowCaption.Text = Enumit.GetWindText(LookHwnd)

'Set Tabs.SelectedItem = Tabs.Tabs(1)
Clearing = False

End Sub

Public Sub DoStuph()
If Me.Visible = False Then MsgBox "WARNING! This screen is VERY DANGEROUS when NOT USED CORRECTLY! If you don't know what you are doing, you may cause Windows to completely stop working. Procede at your own risk.", vbCritical, "WARNING!!!"
Me.Show
Me.WindowState = vbNormal
End Sub

Private Sub TimerFlash_Timer()
Dim Enumit As Enumerator
Set Enumit = New Enumerator
Enumit.Flash LookHwnd, True
TimerFlash.Interval = 600
End Sub

Private Sub txtParent_KeyPress(KeyAscii As Integer)
If IsNumeric(Chr(KeyAscii)) = True Or InStr("ABCDEF", UCase(Chr(KeyAscii))) <> 0 Or KeyAscii = vbKeyDelete Or KeyAscii = vbKeyBack Then
Else
  KeyAscii = 0
End If
End Sub

Private Sub lstHeirachy_DblClick()
LookHwnd = Me.lstHeirachy.ItemData(Me.lstHeirachy.ListIndex)
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 DoEditStyles()

Dim Enumit As New Enumerator

Dim TempStyle As Long
TempStyle = modConst.GetLoBytes(Enumit.StyleVal(LookHwnd))
lblEditStyle.Caption = Enumit.Format8(TempStyle)
Me.lstEdit.Clear

On Error Resume Next

If Enumit.IsStyle(TempStyle, modConst.ES_MULTILINE) Then
  Me.lstEdit.AddItem "ES_MULTILINE"
  TempStyle = TempStyle - modConst.ES_MULTILINE
End If

If Enumit.IsStyle(TempStyle, modConst.ES_LEFT) Then
  Me.lstEdit.AddItem "ES_LEFT"
  TempStyle = TempStyle - modConst.ES_LEFT
End If

If Enumit.IsStyle(TempStyle, modConst.ES_RIGHT) Then
  Me.lstEdit.AddItem "ES_RIGHT"
  TempStyle = TempStyle - modConst.ES_RIGHT
End If

If Enumit.IsStyle(TempStyle, modConst.ES_CENTER) Then
  Me.lstEdit.AddItem "ES_CENTER"
  TempStyle = TempStyle - modConst.ES_CENTER
End If

If Enumit.IsStyle(TempStyle, modConst.ES_UPPERCASE) Then
  Me.lstEdit.AddItem "ES_UPPERCASE"
  TempStyle = TempStyle - modConst.ES_UPPERCASE
End If

If Enumit.IsStyle(TempStyle, modConst.ES_LOWERCASE) Then
  Me.lstEdit.AddItem "ES_LOWERCASE"
  TempStyle = TempStyle - modConst.ES_LOWERCASE
End If

If Enumit.IsStyle(TempStyle, modConst.ES_OEMCONVERT) Then
  Me.lstEdit.AddItem "ES_OEMCONVERT"
  TempStyle = TempStyle - modConst.ES_OEMCONVERT
End If

If Enumit.IsStyle(TempStyle, modConst.ES_AUTOHSCROLL) Then
  Me.lstEdit.AddItem "ES_AUTOHSCROLL"
  TempStyle = TempStyle - modConst.ES_AUTOHSCROLL
End If

If Enumit.IsStyle(TempStyle, modConst.ES_AUTOVSCROLL) Then
  Me.lstEdit.AddItem "ES_AUTOVSCROLL"
  TempStyle = TempStyle - modConst.ES_AUTOVSCROLL
End If

If Enumit.IsStyle(TempStyle, modConst.ES_NUMBER) Then
  Me.lstEdit.AddItem "ES_NUMBER"
  TempStyle = TempStyle - modConst.ES_NUMBER
End If

If Enumit.IsStyle(TempStyle, modConst.ES_NOHIDESEL) Then
  Me.lstEdit.AddItem "ES_NOHIDESEL"
  TempStyle = TempStyle - modConst.ES_NOHIDESEL
End If

If Enumit.IsStyle(TempStyle, modConst.ES_READONLY) Then
  Me.lstEdit.AddItem "ES_READONLY"
  TempStyle = TempStyle - modConst.ES_READONLY
End If

If Enumit.IsStyle(TempStyle, modConst.ES_WANTRETURN) Then
  Me.lstEdit.AddItem "ES_WANTRETURN"
  TempStyle = TempStyle - modConst.ES_WANTRETURN
End If

If Enumit.IsStyle(TempStyle, modConst.ES_PASSWORD) Then
  Me.lstEdit.AddItem "ES_PASSWORD"
  TempStyle = TempStyle - modConst.ES_PASSWORD
End If

If TempStyle <> 0 Then Me.lstEdit.AddItem Enumit.Format8(TempStyle)

If Err Then
MsgBox "Error caught in DoEditStyles, enumerating edit class styles. Windowit is unaffected by this error, and will continue to run Please report the next line to Jolyon_B@Hotmail.Com so that this stupid bug can be fixed." & vbCrLf & _
       "DoEditStyles  " & Err.Number & "    " & Err.Description & "     " & Erl & "     " & TempStyle & "     " & Enumit.ExtStyleVal(LookHwnd), vbCritical, "Error"
End If

End Sub

Private Sub InitEditMsg()

Set EditMessage = New MessagesCol

With EditMessage
  .Add "EM_GETSEL", EM_GETSEL, "Retrieves the current selection state of an edit control. WParam and LParam are programatically set."
  .Add "EM_SETSEL", EM_SETSEL, "Sets the current selection state of an edit control. wParam: the character offset of the first character in the selection. -1 to remove the current selection. lParam: The character offset of the first character after the selection. If wParam is 0 and this parameter is -1, then all text in the control is selected."
  .Add "EM_GETRECT", EM_GETRECT, "Retrieves the formatting rectangle for an edit control. wParam: Not used. lParam: Programatically set."
  .Add "EM_SETRECT", EM_SETRECT, "Set the formatting rectangle of an edit control. wParam (set for input purposes only) should contain: ""X1, Y1"". Likewise, lParam should contain: ""X2, Y2"""
  .Add "EM_SETRECTNP", EM_SETRECTNP, "Set the formatting rectangle of an edit control. wParam (set for input purposes only) should contain: ""X1, Y1"". Likewise, lParam should contain: ""X2, Y2"". Is the same as EM_SETRECT, except that the control is not redrawn."
  .Add "EM_SCROLL", EM_SCROLL, "Scrolls the text vertically in a multiline edit control. Equivalent of a WM_VSCROLL message. wParam: 0 for line up, 1 for line down, 2 for page up, 3 for page down. lParam: Not used."
  .Add "EM_LINESCROLL", EM_LINESCROLL, "Scrolls the contents of an edit control. wParam: contains the number of characters to scroll horizontally: positive to scroll right, negative to scroll left. lParam: Contains the number of characters to scroll vertically. Positive for up, Negative for down. FOR SOME REASON UNKNOWN TO ME, DOES NOT FUNCTION CORRECTL FOR VERTICAL SCROLLING."
  .Add "EM_SCROLLCARET", EM_SCROLLCARET, "Scrolls the caret into view in an edit control. wParam and lParam are not used."
  .Add "EM_GETMODIFY", EM_GETMODIFY, "Get the modify bit in an edit control. Parameters not used."
  .Add "EM_SETMODIFY", EM_SETMODIFY, "Set the modify bit in an edit control. wParam: 0 for false, 1 for true. lParam not used."
  .Add "EM_GETLINECOUNT", EM_GETLINECOUNT, "Retrieve the number of lines in an edit control. Returns 1 even if there is no text."
  .Add "EM_LINEINDEX", EM_LINEINDEX, "Determines the character offset of the first character in the specified line. -1 on error. wParam: The number of a line in an edit control. Line numbering starts at 0, -1 specifies the current position of the caret. lParam not used."
  .Add "EM_SETHANDLE", EM_SETHANDLE, "Set the memory handle that will be used by a multiline edit control. DANGEROUS. wParam: Memory handle that the edit control uses to store the text instead of allocating it's own memory. lParam not used."
  .Add "EM_GETHANDLE", EM_GETHANDLE, "Get the current handle of the memory that a multiline edit control uses to store it's text. Parameters not used."
  .Add "EM_GETTHUMB", EM_GETTHUMB, "Retrieves the position of the scroll box in a multiline edit control."
  .Add "EM_LINELENGTH", EM_LINELENGTH, "Determines the length of the line containing the specified character. wParam: An offset chatacter in the edit control text string. If -1, returns the number of unselected characters in all of the lines containing selected text. lParam not used."
  .Add "EM_REPLACESEL", EM_REPLACESEL, "Replaces the selected text in an edit control with the string specified. wParam: 1 if the replacement operation can be undone. 0 if the operation cannot. lParam: the text string."
  .Add "EM_GETLINE", EM_GETLINE, "Retrieves a line of text from the edit control. wParam is the line. lParam not used."
  .Add "EM_LIMITTEXT", EM_LIMITTEXT, "Used to specify the maximum number of characteres that can be obtained in an edit control. EM_SETLIMITTEXT has superseded this message. wParam: The maximum length of the text that can be entered into an edit control. 0 for 2, 147, 483, 646 characters. lParam not used."
  .Add "EM_CANUNDO", EM_CANUNDO, "Determines if the undo buffer contains information that can be used to reverse the previous editing information. No Params."
  .Add "EM_UNDO", EM_UNDO, "Reverses the most recent editing operation. Same as WM_UNDO. No Parameters."
  .Add "EM_FMTLINES", EM_FMTLINES, "Determines whether or not soft line breaks are returned in the text returned by the WM_GETTEXT message. A soft line break equates to CR-CR-LF. wParam: 1 for true, soft line breaks are returned, 0 for false. lParam not used."
  .Add "EM_LINEFROMCHAR", EM_LINEFROMCHAR, "Determines the line number for the line containing a specific character. wParam is the character offset. -1 for the current line. lParam not used."
  .Add "EM_SETTABSTOPS", EM_SETTABSTOPS, "Used to set the tab stop positions within an edit control. UNIMPLEMENTED AS OF YET DUE TO TECHNICAL DIFFICULTIES."
  .Add "EM_SETPASSWORDCHAR", EM_SETPASSWORDCHAR, "Sets the password character used. wParam: the ascii value of the new password character. 0 for normal text. lParam not used."
  .Add "EM_EMPTYUNDOBUFFER", EM_EMPTYUNDOBUFFER, "Empties the undo buffer. No parameters."
  .Add "EM_GETFIRSTVISIBLELINE", EM_GETFIRSTVISIBLELINE, "Retrieves the number of the first line that is visible inside the edit control. Lines are numbered starting with 0. For single line edit controls, retrieves the first visible character. Characters numbered starting with 0. No parameters."
  .Add "EM_SETREADONLY", EM_SETREADONLY, "Allows you to change the read-only flag for an edit control. wParam 1 for read only. 0 for not. lParam not used."
  .Add "EM_GETPASSWORDCHAR", EM_GETPASSWORDCHAR, "Retrieves the password character. Returns ascii value. 0 if no password character set. No parameters."
  .Add "EM_SETMARGINS", EM_SETMARGINS, "Used to set the widths of the margins of an edit control. NOT IMPLEMENTED DUE TO TECHNICAL DIFFICULTIES."
  .Add "EM_GETMARGINS", EM_GETMARGINS, "Retrieves the widths of the left and right margins for an edit control. No parameters."
  .Add "EM_SETLIMITTEXT", EM_SETLIMITTEXT, "Sets the maximum number of characters that can be contained in an edit control. wParam: Max number to be entered into the control. 0 to set to 32,766 characteres. lParam not used."
  .Add "EM_GETLIMITTEXT", EM_GETLIMITTEXT, "Gets the maximum number of characters that can be entered into an edit control. Parameters not used."
  .Add "EM_POSFROMCHAR", EM_POSFROMCHAR, "Retrieves the coordinates of the specified chatacter in an edit control. wParam not used. lParam is the characters index/offset. Returns in client coordinates."
  .Add "EM_CHARFROMPOS", EM_CHARFROMPOS, "Retrieves the character index and line index of the character nearest to a specified point in an edit control. wParam (for ease of input ONLY), X coordinate of the point. lParam, y coordinate of a point. Device coodinates relative to the client area of the control."
  .Add "WM_COMMAND", WM_COMMAND, "HIGHLY DANGEROUS- Used to send special EN_ messages, and special windows commands. Use at own risk! No documentation."
  .Add "WM_COPY", WM_COPY, "Copy selected text into clipboard. No parameters."
  .Add "WM_CUT", WM_CUT, "Cut selected text to the clipboard. No parameters."
  .Add "WM_PASTE", WM_PASTE, "Paste the selected text from the clipboard. No parameters"
  .Add "WM_UNDO", WM_UNDO, "Same as EM_UNDO message. Undoes the last operation, no parameters."
  .Add "WM_GETTEXT", WM_GETTEXT, "Get the text from an edit control. Parameters are implemented programatically."
  .Add "WM_SETTEXT", WM_SETTEXT, "Set the text for an edit control. wParam not used. lParam the string to set."
End With

With cmboEM
  .Clear
  .AddItem "EM_GETSEL"
  .ItemData(.NewIndex) = EM_GETSEL
  .AddItem "EM_SETSEL"
  .ItemData(.NewIndex) = EM_SETSEL
  .AddItem "EM_GETRECT"
  .ItemData(.NewIndex) = EM_GETRECT
  .AddItem "EM_SETRECT"
  .ItemData(.NewIndex) = EM_SETRECT
  .AddItem "EM_SETRECTNP"
  .ItemData(.NewIndex) = EM_SETRECTNP
  .AddItem "EM_SCROLL"
  .ItemData(.NewIndex) = EM_SCROLL
  .AddItem "EM_LINESCROLL"
  .ItemData(.NewIndex) = EM_LINESCROLL
  .AddItem "EM_SCROLLCARET"
  .ItemData(.NewIndex) = EM_SCROLLCARET
  .AddItem "EM_GETMODIFY"
  .ItemData(.NewIndex) = EM_GETMODIFY
  .AddItem "EM_SETMODIFY"
  .ItemData(.NewIndex) = EM_SETMODIFY
  .AddItem "EM_GETLINECOUNT"
  .ItemData(.NewIndex) = EM_GETLINECOUNT
  .AddItem "EM_LINEINDEX"
  .ItemData(.NewIndex) = EM_LINEINDEX
  .AddItem "EM_SETHANDLE"
  .ItemData(.NewIndex) = EM_SETHANDLE
  .AddItem "EM_GETHANDLE"
  .ItemData(.NewIndex) = EM_GETHANDLE
  .AddItem "EM_GETTHUMB"
  .ItemData(.NewIndex) = EM_GETTHUMB
  .AddItem "EM_LINELENGTH"
  .ItemData(.NewIndex) = EM_LINELENGTH
  .AddItem "EM_REPLACESEL"
  .ItemData(.NewIndex) = EM_REPLACESEL
  .AddItem "EM_GETLINE"
  .ItemData(.NewIndex) = EM_GETLINE
  .AddItem "EM_LIMITTEXT"
  .ItemData(.NewIndex) = EM_LIMITTEXT
  .AddItem "EM_CANUNDO"
  .ItemData(.NewIndex) = EM_CANUNDO
  .AddItem "EM_UNDO"
  .ItemData(.NewIndex) = EM_UNDO
  .AddItem "EM_FMTLINES"
  .ItemData(.NewIndex) = EM_FMTLINES
  .AddItem "EM_LINEFROMCHAR"
  .ItemData(.NewIndex) = EM_LINEFROMCHAR
  .AddItem "EM_SETTABSTOPS"
  .ItemData(.NewIndex) = EM_SETTABSTOPS
  .AddItem "EM_SETPASSWORDCHAR"
  .ItemData(.NewIndex) = EM_SETPASSWORDCHAR
  .AddItem "EM_EMPTYUNDOBUFFER"
  .ItemData(.NewIndex) = EM_EMPTYUNDOBUFFER
  .AddItem "EM_GETFIRSTVISIBLELINE"
  .ItemData(.NewIndex) = EM_GETFIRSTVISIBLELINE
  .AddItem "EM_SETREADONLY"
  .ItemData(.NewIndex) = EM_SETREADONLY
  .AddItem "EM_GETPASSWORDCHAR"
  .ItemData(.NewIndex) = EM_GETPASSWORDCHAR
  .AddItem "EM_SETMARGINS"
  .ItemData(.NewIndex) = EM_SETMARGINS
  .AddItem "EM_GETMARGINS"
  .ItemData(.NewIndex) = EM_GETMARGINS
  .AddItem "EM_SETLIMITTEXT"
  .ItemData(.NewIndex) = EM_SETLIMITTEXT
  .AddItem "EM_GETLIMITTEXT"
  .ItemData(.NewIndex) = EM_GETLIMITTEXT
  .AddItem "EM_POSFROMCHAR"
  .ItemData(.NewIndex) = EM_POSFROMCHAR
  .AddItem "EM_CHARFROMPOS"
  .ItemData(.NewIndex) = EM_CHARFROMPOS
  .AddItem "WM_COMMAND"
  .ItemData(.NewIndex) = WM_COMMAND
  .AddItem "WM_COPY"
  .ItemData(.NewIndex) = WM_COPY
  .AddItem "WM_CUT"
  .ItemData(.NewIndex) = WM_CUT
  .AddItem "WM_PASTE"
  .ItemData(.NewIndex) = WM_PASTE
  .AddItem "WM_UNDO"
  .ItemData(.NewIndex) = WM_UNDO
  .AddItem "WM_GETTEXT"
  .ItemData(.NewIndex) = WM_GETTEXT
  .AddItem "WM_SETTEXT"
  .ItemData(.NewIndex) = WM_SETTEXT
  .ListIndex = 0
End With

End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -