www.pudn.com > windowsrunning > frmEdit.frm
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frmEdit
BorderStyle = 1 'Fixed Single
Caption = "Window Property Editor"
ClientHeight = 4800
ClientLeft = 45
ClientTop = 330
ClientWidth = 7635
Icon = "frmEdit.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 4800
ScaleWidth = 7635
StartUpPosition = 3 'Windows Default
Begin VB.Frame frameTabs
Caption = "Size"
Height = 3525
Index = 1
Left = 60
TabIndex = 27
Top = 60
Width = 7395
Begin VB.CommandButton cmdSendBack
Caption = "Send to Back of Z-Order"
Height = 435
Left = 5040
TabIndex = 60
Top = 2940
Width = 2235
End
Begin VB.CommandButton cmdBringTop
Caption = "Bring to Front of Z-Order"
Height = 435
Left = 5040
TabIndex = 59
Top = 2460
Width = 2235
End
Begin VB.TextBox txtabsParent
BackColor = &H00C0C0C0&
Height = 315
Left = 1560
Locked = -1 'True
TabIndex = 52
Top = 2040
Width = 1695
End
Begin VB.TextBox txtWindClient
BackColor = &H00C0C0C0&
Height = 315
Left = 1560
Locked = -1 'True
TabIndex = 50
Top = 1680
Width = 1695
End
Begin VB.TextBox txtParentClient
BackColor = &H00C0C0C0&
Height = 315
Left = 1560
Locked = -1 'True
TabIndex = 49
Top = 1320
Width = 1695
End
Begin VB.TextBox txtParentWindowRect
BackColor = &H00C0C0C0&
Height = 315
Left = 1560
Locked = -1 'True
TabIndex = 47
Top = 960
Width = 1695
End
Begin VB.CommandButton cmdHelp
Caption = "HELP!!!"
Height = 435
Left = 5040
TabIndex = 45
Top = 1020
Width = 2235
End
Begin VB.CommandButton cmdSize
Caption = "Set Sizes"
Height = 435
Left = 3480
TabIndex = 44
Top = 2640
Width = 1155
End
Begin VB.TextBox txtWndSize
Height = 285
Index = 1
Left = 2760
TabIndex = 43
Top = 2880
Width = 615
End
Begin VB.TextBox txtWndSize
Height = 285
Index = 0
Left = 1980
TabIndex = 41
Top = 2880
Width = 615
End
Begin VB.TextBox txtWindPos
Height = 285
Index = 0
Left = 1980
TabIndex = 37
Top = 2520
Width = 615
End
Begin VB.TextBox txtWindPos
Height = 285
Index = 1
Left = 2760
TabIndex = 38
Top = 2520
Width = 615
End
Begin VB.Timer TimerFlash
Enabled = 0 'False
Interval = 500
Left = 4560
Top = 2940
End
Begin VB.CommandButton cmdFlash
Caption = "Flash"
Height = 435
Left = 5040
TabIndex = 35
Top = 1500
Width = 2235
End
Begin VB.CommandButton cmdFore
Caption = "SetForeGroundWindow"
Height = 435
Left = 5040
TabIndex = 34
Top = 1980
Width = 2235
End
Begin VB.CommandButton cmdSetPos
Caption = "Set Position:"
Height = 375
Left = 3420
TabIndex = 33
Top = 240
Width = 1455
End
Begin VB.ComboBox cmboWndPos
Height = 315
Left = 5040
Style = 2 'Dropdown List
TabIndex = 32
Top = 240
Width = 1695
End
Begin VB.TextBox txtWindRec
BackColor = &H00C0C0C0&
Height = 315
Left = 1560
Locked = -1 'True
TabIndex = 31
Top = 240
Width = 1695
End
Begin VB.TextBox txtCliRect
BackColor = &H00C0C0C0&
Height = 315
Left = 1560
Locked = -1 'True
TabIndex = 30
Top = 600
Width = 1695
End
Begin VB.Label lblNote
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = $"frmEdit.frx":030A
Height = 1635
Left = 3300
TabIndex = 71
Top = 780
Width = 1680
WordWrap = -1 'True
End
Begin VB.Label lblAbsParent
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Abs Parent Client"
Height = 195
Left = 180
TabIndex = 53
Top = 2100
Width = 1215
End
Begin VB.Label lblWindreference
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Window/Client"
Height = 195
Left = 180
TabIndex = 51
Top = 1740
Width = 1050
End
Begin VB.Label lblParentClient
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Parent Client:"
Height = 195
Left = 180
TabIndex = 48
Top = 1380
Width = 945
End
Begin VB.Label lblParentCliRect
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Parent Window:"
Height = 195
Left = 180
TabIndex = 46
Top = 1020
Width = 1140
End
Begin VB.Label lblDash
AutoSize = -1 'True
Caption = "-"
Height = 195
Index = 1
Left = 2640
TabIndex = 42
Top = 2880
Width = 45
End
Begin VB.Label lblWinSize
AutoSize = -1 'True
Caption = "Window Size- X, Y"
Height = 195
Left = 240
TabIndex = 40
Top = 2940
Width = 1320
End
Begin VB.Label lblDash
AutoSize = -1 'True
Caption = "-"
Height = 195
Index = 0
Left = 2640
TabIndex = 39
Top = 2520
Width = 45
End
Begin VB.Label lblWndPos
AutoSize = -1 'True
Caption = "Window Position- X, Y"
Height = 195
Left = 240
TabIndex = 36
Top = 2580
Width = 1575
End
Begin VB.Label lblClient
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Client Rect:"
Height = 195
Left = 180
TabIndex = 29
Top = 660
Width = 825
End
Begin VB.Label lblWind
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Window Rect:"
Height = 195
Left = 180
TabIndex = 28
Top = 300
Width = 1020
End
End
Begin VB.Frame frameTabs
Caption = "Windows Messages"
Height = 3525
Index = 3
Left = 60
TabIndex = 66
Top = 60
Width = 7395
Begin VB.CommandButton mcdGetWindText
Caption = "GetWindowText"
Height = 375
Left = 2820
TabIndex = 72
Top = 240
Width = 1335
End
Begin VB.CommandButton cmdHelpWM
Caption = "HELP!!!"
Height = 495
Left = 6060
TabIndex = 70
Top = 2940
Width = 1215
End
Begin VB.CommandButton cmdSetText
Caption = "SetWindowText"
Height = 375
Left = 4200
TabIndex = 69
Top = 240
Width = 1335
End
Begin VB.TextBox txtWindowCaption
Height = 285
Left = 180
TabIndex = 68
Top = 300
Width = 2535
End
Begin VB.CommandButton cmdWmClose
Caption = "WM_CLOSE"
Height = 375
Left = 180
TabIndex = 67
Top = 720
Width = 1215
End
End
Begin VB.Frame frameTabs
Caption = "General Windows Information"
Height = 3525
Index = 0
Left = 60
TabIndex = 0
Top = 60
Width = 7395
Begin VB.CommandButton cmdParent
Caption = "Parent Window"
Height = 375
Left = 3660
TabIndex = 58
Top = 3060
Width = 1695
End
Begin VB.CommandButton cmdNext
Caption = "Owner Window"
Height = 375
Index = 4
Left = 1920
TabIndex = 57
Top = 3060
Width = 1695
End
Begin VB.CommandButton cmdNext
Caption = "Child Window"
Height = 375
Index = 5
Left = 180
TabIndex = 56
Top = 3060
Width = 1695
End
Begin VB.CommandButton cmdNext
Caption = "Previous Window"
Height = 375
Index = 3
Left = 1920
TabIndex = 55
Top = 2640
Width = 1695
End
Begin VB.CommandButton cmdNext
Caption = "Next Window"
Height = 375
Index = 2
Left = 180
TabIndex = 54
Top = 2640
Width = 1695
End
Begin VB.CheckBox chkOnTop
Caption = "Is On Top"
Height = 315
Left = 5040
TabIndex = 26
Top = 2100
Width = 1035
End
Begin VB.CommandButton cmdSetPArent
Caption = "Set Parent"
Height = 375
Left = 3900
TabIndex = 25
Top = 2640
Width = 1335
End
Begin VB.TextBox txtParent
Height = 315
Left = 5280
TabIndex = 24
Top = 2640
Width = 1995
End
Begin VB.CheckBox chkVisible
Caption = "Is Visible"
Height = 315
Left = 3960
TabIndex = 12
Top = 2100
Width = 975
End
Begin VB.CheckBox chkEnabled
Caption = "Is Enabled"
Height = 315
Left = 6120
TabIndex = 11
Top = 2100
Width = 1155
End
Begin VB.TextBox txtProcessName
BackColor = &H00C0C0C0&
Height = 315
Left = 5220
Locked = -1 'True
TabIndex = 10
Top = 960
Width = 2055
End
Begin VB.TextBox txtProcessID
BackColor = &H00C0C0C0&
Height = 315
Left = 5220
Locked = -1 'True
TabIndex = 9
Top = 600
Width = 2055
End
Begin VB.TextBox txtThreadID
BackColor = &H00C0C0C0&
Height = 315
Left = 5220
Locked = -1 'True
TabIndex = 8
Top = 240
Width = 2055
End
Begin VB.ListBox lstHeirachy
Height = 1230
Left = 180
TabIndex = 7
Top = 1320
Width = 3435
End
Begin VB.TextBox txtClass
BackColor = &H00C0C0C0&
Height = 315
Left = 1560
Locked = -1 'True
TabIndex = 6
Top = 600
Width = 2055
End
Begin VB.TextBox txthWnd
BackColor = &H00C0C0C0&
Height = 315
Left = 1560
Locked = -1 'True
TabIndex = 5
Top = 240
Width = 2055
End
Begin VB.TextBox txtWindRect
BackColor = &H00C0C0C0&
Height = 315
Index = 1
Left = 6060
Locked = -1 'True
TabIndex = 4
Top = 1740
Width = 1035
End
Begin VB.TextBox txtClientRect
BackColor = &H00C0C0C0&
Height = 315
Index = 1
Left = 6060
Locked = -1 'True
TabIndex = 3
Top = 1380
Width = 1035
End
Begin VB.TextBox txtClientRect
BackColor = &H00C0C0C0&
Height = 315
Index = 0
Left = 4980
Locked = -1 'True
TabIndex = 2
Top = 1380
Width = 1035
End
Begin VB.TextBox txtWindRect
BackColor = &H00C0C0C0&
Height = 315
Index = 0
Left = 4980
Locked = -1 'True
TabIndex = 1
Top = 1740
Width = 1035
End
Begin VB.Label lblProcessName
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Process Name:"
Height = 195
Left = 3900
TabIndex = 20
Top = 1020
Width = 1080
End
Begin VB.Label lblProcessID
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Process ID:"
Height = 195
Left = 3900
TabIndex = 19
Top = 660
Width = 825
End
Begin VB.Label lblThreadID
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Thread ID:"
Height = 195
Left = 3900
TabIndex = 18
Top = 300
Width = 765
End
Begin VB.Label lblHeirachy
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Window Heirachy: (hWnd, Class)"
Height = 195
Left = 180
TabIndex = 17
Top = 1020
Width = 2340
End
Begin VB.Label lblClass
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Window's Class:"
Height = 195
Left = 180
TabIndex = 16
Top = 660
Width = 1155
End
Begin VB.Label lblhWnd
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Window's hWnd:"
Height = 195
Left = 120
TabIndex = 15
Top = 300
Width = 1215
End
Begin VB.Label lblWindRect
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Window Rect:"
Height = 195
Left = 3900
TabIndex = 14
Top = 1800
Width = 1020
End
Begin VB.Label lblClientRect
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Client Rect:"
Height = 195
Left = 3900
TabIndex = 13
Top = 1440
Width = 825
End
End
Begin VB.CommandButton cmdRedraw
Caption = "&Force Redraw"
Height = 555
Left = 5340
TabIndex = 85
Top = 4140
Width = 2235
End
Begin VB.Frame frameTabs
Caption = """Edit"" Class Information"
Height = 3525
Index = 2
Left = 60
TabIndex = 61
Top = 60
Width = 7395
Begin VB.ComboBox cmboEM
Height = 315
Left = 1380
Sorted = -1 'True
Style = 2 'Dropdown List
TabIndex = 73
Top = 780
Width = 3015
End
Begin VB.TextBox txtEditReturnVal
Height = 675
Left = 1380
Locked = -1 'True
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 84
Top = 2760
Width = 4095
End
Begin VB.CommandButton cmdSendEditMsg
Caption = "Send Message"
Height = 615
Left = 5580
TabIndex = 82
Top = 2820
Width = 1695
End
Begin VB.TextBox txtEditInfo
BackColor = &H00FFFFFF&
Height = 855
Left = 1380
Locked = -1 'True
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 80
Top = 1860
Width = 3015
End
Begin VB.TextBox txtEditLParam
Height = 315
Left = 1380
TabIndex = 78
Text = "0"
Top = 1500
Width = 3015
End
Begin VB.TextBox txtEditWParam
Height = 315
Left = 1380
TabIndex = 76
Text = "0"
Top = 1140
Width = 3015
End
Begin VB.ListBox lstEdit
Height = 840
Left = 4500
TabIndex = 63
Top = 1200
Width = 2715
End
Begin VB.CommandButton cmdGetEditStyle
Caption = "Get Edit Class Style"
Height = 375
Left = 4500
TabIndex = 62
Top = 780
Width = 1755
End
Begin VB.Label lblEditStyle
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "0"
Height = 195
Left = 6360
TabIndex = 65
Top = 840
Width = 90
End
Begin VB.Label lblReturn
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Return Value:"
Height = 195
Left = 180
TabIndex = 83
Top = 2640
Width = 975
End
Begin VB.Label lblEditMesNote
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "NOTE: This command is potentially VERY DANGEROUS if used incorrectly."
Height = 585
Left = 4500
TabIndex = 81
Top = 2100
Width = 2700
WordWrap = -1 'True
End
Begin VB.Label lblEditInfo
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Information:"
Height = 195
Left = 180
TabIndex = 79
Top = 1920
Width = 825
End
Begin VB.Label lblEditLParam
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "LParam:"
Height = 195
Left = 180
TabIndex = 77
Top = 1500
Width = 585
End
Begin VB.Label lblWParam
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "WParam:"
Height = 195
Left = 180
TabIndex = 75
Top = 1140
Width = 660
End
Begin VB.Label lblEditMessage
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Send Message:"
Height = 195
Left = 180
TabIndex = 74
Top = 840
Width = 1110
End
Begin VB.Label lblIsEdit
AutoSize = -1 'True
Caption = $"frmEdit.frx":03A4
Height = 390
Left = 180
TabIndex = 64
Top = 300
Width = 7125
WordWrap = -1 'True
End
End
Begin VB.CommandButton cmdBack
Caption = "<-- &Back"
Height = 555
Left = 3000
TabIndex = 22
Top = 4140
Width = 2235
End
Begin VB.CommandButton cmdRefresh
Caption = "&Refresh Properties"
Height = 555
Left = 660
TabIndex = 21
Top = 4140
Width = 2235
End
Begin MSComctlLib.TabStrip Tabs
Height = 3915
Left = 60
TabIndex = 23
Top = 60
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 = "frmEdit"
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
'
Public EditMessage As MessagesCol
Private myLookHwnd As Long
Private CurrentTab
Private Clearing As Boolean
Private Sub chkEnabled_Click()
If Clearing = True Then Exit Sub
Dim Worker As Enumerator
Set Worker = New Enumerator
Worker.SetEnabled LookHwnd, CBool(Me.chkEnabled.Value)
End Sub
Private Sub chkOnTop_Click()
If Clearing = True Then Exit Sub
Dim Worker As Enumerator
Set Worker = New Enumerator
Worker.SetOntop LookHwnd, CBool(Me.chkOnTop.Value)
End Sub
Private Sub chkVisible_Click()
If Clearing = True Then Exit Sub
Dim Worker As Enumerator
Set Worker = New Enumerator
Worker.SetVisible LookHwnd, CBool(Me.chkVisible.Value)
End Sub
Private Sub cmboEM_Click()
On Error Resume Next
Me.txtEditInfo.Text = EditMessage(cmboEM.List(cmboEM.ListIndex)).Desc
End Sub
Private Sub cmdBack_Click()
'Me.Hide
frmProperty.LookHwnd = Me.LookHwnd
frmProperty.Show
frmProperty.WindowState = 0
'frmSelect.cmdEnum.Value = True
End Sub
Private Sub cmdBringTop_Click()
Dim Enumit As New Enumerator
Enumit.ForeGround LookHwnd
Enumit.BringToTop LookHwnd
End Sub
Private Sub cmdFlash_Click()
Static Flashing As Boolean
If Flashing = False Then
Flashing = True
cmdFlash.Caption = "Stop Flashing"
TimerFlash.Enabled = True
Else
Flashing = False
cmdFlash.Caption = "Flash"
TimerFlash.Enabled = False
Dim Enumit As Enumerator
Set Enumit = New Enumerator
Enumit.Flash LookHwnd, False
End If
End Sub
Private Sub cmdFore_Click()
Dim Enumit As Enumerator
Set Enumit = New Enumerator
Enumit.ForeGround LookHwnd
End Sub
Private Sub cmdGetEditStyle_Click()
DoEditStyles
End Sub
Private Sub cmdHelp_Click()
MsgBox "The placement of the window can be rather confusing, especially as there are 5 different pairs of numbers to think about." & vbCrLf & _
"The Window Rect co-ordinates refer to the window's current position on the screen, in screen co-ordinates." & vbCrLf & _
"The Client Rect co-ordinates refer to the window's current client area, and are given in reference to the whole window's area." & vbCrLf & _
"The Parent Window co-ordinates refer to the parent's current window co-ordinates, in reference to the screen." & vbCrLf & _
"The Parent Client Rect refers to the parent's CLIENT Co-ordinates, in reference to the parent's window co-ordinates." & vbCrLf & _
"The Window/Client co-ordinates refer to the window's position, and are given in reference to it's parent's client area. This is the most important one, as it shows the current position of the window in the co-ordinates that you input to change them." & vbCrLf & _
"The Absolute Parent Client Rect co-ordinates refer to the Screen (X, Y) position that is (0, 0) for setting the current window's (X, Y) position. I know it sounds rather complicated, and it is. Think about the difficulties that I had programming it...", vbInformation, "Co-ordinate systems"
End Sub
Private Sub cmdHelpWM_Click()
MsgBox "This pane provides functionality to many messages with the ""WM_"" prefix, and also a few that aren't nessescarily messages (i.e., functions). To say what each and every message does is beyond the scope of this help screen. To find out what they all do, use the MSDN library, or search for them on the internet.", vbInformation, "Help"
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 cmdRedraw_Click()
Dim Enumit As New Enumerator
Enumit.ForceRedraw Me.LookHwnd
End Sub
Private Sub cmdRefresh_Click()
ClearAll
End Sub
Private Sub cmdSetFocus_Click()
Dim Enumit As Enumerator
Set Enumit = New Enumerator
Enumit.FocusWind LookHwnd
End Sub
Private Sub cmdSendBack_Click()
Dim Enumit As New Enumerator
Enumit.ForeGround LookHwnd
Enumit.SendToBottom LookHwnd
End Sub
Private Sub cmdSendEditMsg_Click()
modEditMessages.SendEditMessage Me.txtEditReturnVal, Me.cmboEM.ItemData(Me.cmboEM.ListIndex), Me.txtEditWParam, Me.txtEditLParam, Me.LookHwnd
End Sub
Private Sub cmdSetPArent_Click()
Dim Worker As Enumerator
Set Worker = New Enumerator
If MsgBox("WARNING! This is an EXTREMELY DANGEROUS COMMAND, and should only be used if you KNOW WHAT YOU ARE DOING. Do you wish to proceed?", vbCritical Or vbYesNo, "WARNING!") = vbYes Then
Worker.SetParent LookHwnd, Val("&H" & txtParent.Text)
End If
End Sub
Private Sub cmdSetPos_Click()
If cmboWndPos.ListIndex = -1 Then Exit Sub
Dim Worker As Enumerator
Set Worker = New Enumerator
Worker.SetWindPos LookHwnd, cmboWndPos.ListIndex
End Sub
Private Sub cmdSetText_Click()
Dim Enumit As New Enumerator
Enumit.SetWindText LookHwnd, Me.txtWindowCaption.Text
End Sub
Private Sub cmdSize_Click()
If Not IsNumeric(Me.txtWindPos(0).Text) Or Not IsNumeric(Me.txtWindPos(1).Text) Or Not IsNumeric(Me.txtWndSize(0).Text) Or Not IsNumeric(Me.txtWndSize(1).Text) Then
MsgBox "Please enter numeric data", vbInformation, "Change Size and Position"
Exit Sub
End If
Dim Worker As Enumerator
Set Worker = New Enumerator
Worker.SetWinSizePos LookHwnd, Val(txtWindPos(0).Text), Val(txtWindPos(1).Text), Val(txtWndSize(0).Text), Val(txtWndSize(1).Text)
Worker.ForeGround LookHwnd
End Sub
Private Sub cmdWmClose_Click()
Dim Enumit As New Enumerator
Enumit.TerminateWind LookHwnd
End Sub
Private Sub Form_Load()
Dim i As Integer
Me.cmboWndPos.AddItem "1. Normal"
Me.cmboWndPos.AddItem "2. Maximised"
Me.cmboWndPos.AddItem "3. Minimised"
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
InitEditMsg
ClearAll
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
Set EditMessage = Nothing
End Sub
Private Sub mcdGetWindText_Click()
Dim Enumit As New Enumerator
Me.txtWindowCaption.Text = Enumit.GetWindText(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
frmProperty.LookHwnd = myLookHwnd
End Property
Private Sub ClearAll()
Clearing = True
Dim Enumit As Enumerator
Set Enumit = New Enumerator
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))
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
Me.txtCliRect = Me.txtClientRect(0).Text
' 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.txtWindRec = Me.txtWindRect(0).Text
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