This repository has been archived by the owner on Jan 5, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
frmHighlight.frm
148 lines (134 loc) · 4.57 KB
/
frmHighlight.frm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
VERSION 5.00
Begin VB.Form frmMarker
AutoRedraw = -1 'True
BorderStyle = 0 'Íåò
ClientHeight = 480
ClientLeft = -6060
ClientTop = -6060
ClientWidth = 510
ClipControls = 0 'False
ControlBox = 0 'False
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 32
ScaleMode = 3 'Ïèêñåëü
ScaleWidth = 34
ShowInTaskbar = 0 'False
Visible = 0 'False
Begin VB.Shape shpPoint
BackColor = &H000000FF&
BackStyle = 1 'Íåïðîçðà÷íî
Height = 120
Left = 240
Shape = 3 'Êðóã
Top = 240
Width = 120
End
Begin VB.Shape shp
BackColor = &H0000FFFF&
BackStyle = 1 'Íåïðîçðà÷íî
BorderColor = &H00FFFFFF&
FillColor = &H000000C0&
FillStyle = 7 'Äèàãîíàëüíîå ïåðåñå÷åíèå
Height = 795
Left = -120
Top = 0
Width = 885
End
Begin VB.Menu mnuMain
Caption = "[Main]"
Visible = 0 'False
Begin VB.Menu mnuHide
Caption = "&Ñêðûòü ìàðêåð"
End
Begin VB.Menu mnuDisable
Caption = "&Îòêëþ÷èòü ìàðêåð"
End
Begin VB.Menu mnuAlwaysOnTop
Caption = "&Âñåãäà âèäèìûé"
End
Begin VB.Menu s0
Caption = "-"
End
Begin VB.Menu mnuChangeCoordinatesOnMove
Caption = "&Ïðè ïåðåìåùåíèè èçìåíÿòü êîîðäèíàòû òî÷êè"
Checked = -1 'True
End
Begin VB.Menu s1
Caption = "-"
End
Begin VB.Menu mnuInsertClick
Caption = "&Âñòàâèòü êîìàíäó "
End
Begin VB.Menu mnuInsertSetCursorPos
Caption = "&Âñòàâèòü êîìàíäó "
End
End
End
Attribute VB_Name = "frmMarker"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Activate()
shpPoint.Left = MARKER_SIZE / 2 - shpPoint.Width / 2
shpPoint.Top = MARKER_SIZE / 2 - shpPoint.Height / 2
SetWindowPos hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE
End Sub
Private Sub Form_DblClick()
frmMain.InsertFunc "Êëèê(" & GetMarkerX & ", " & GetMarkerY & ")"
End Sub
Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyInsert Then frmMain.InsertFunc "Êëèê(" & GetMarkerX & ", " & GetMarkerY & ")"
End Sub
Private Sub Form_Load()
Show
frmMain.Show
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Static PrevX As Single, PrevY As Single
If Button = 1 And WindowState = 0 Then
Me.Left = Me.Left + (X - PrevX)
Me.Top = Me.Top + (Y - PrevY)
If mnuChangeCoordinatesOnMove.Checked Then frmMain.ChangeFuncParametrs True, GetMarkerX, GetMarkerY
Else
PrevX = X
PrevY = Y
End If
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
If mnuChangeCoordinatesOnMove.Checked Then frmMain.ChangeFuncParametrs True, GetMarkerX, GetMarkerY
ElseIf Button = 2 Then
mnuInsertClick.Caption = "Âñòàâèòü êîìàíäó 'Êëèê(" & GetMarkerX & ", " & GetMarkerY & ")'" & vbTab & "Ctrl+Insert"
mnuInsertSetCursorPos.Caption = "Âñòàâèòü êîìàíäó 'Ïåðåìåñòèòü êóðñîð(" & GetMarkerX & ", " & GetMarkerY & ")'" & vbTab & "Alt+Insert"
PopupMenu mnuMain, , , , mnuHide
End If
End Sub
Function GetMarkerX() As Long
GetMarkerX = (Me.Left / Screen.TwipsPerPixelX) + shpPoint.Left + shpPoint.Width / 2
End Function
Function GetMarkerY() As Long
GetMarkerY = (Me.Top / Screen.TwipsPerPixelX) + shpPoint.Top + shpPoint.Height / 2
End Function
Private Sub mnuAlwaysOnTop_Click()
mnuAlwaysOnTop.Checked = Not mnuAlwaysOnTop.Checked
End Sub
Private Sub mnuChangeCoordinatesOnMove_Click()
mnuChangeCoordinatesOnMove.Checked = Not mnuChangeCoordinatesOnMove.Checked
End Sub
Private Sub mnuDisable_Click()
frmPSettings.chkShowMarker = 0
SaveSettings
HideMarker
End Sub
Private Sub mnuHide_Click()
HideMarker
End Sub
Private Sub mnuInsertClick_Click()
frmMain.InsertFunc "Êëèê(" & GetMarkerX & ", " & GetMarkerY & ")"
End Sub
Private Sub mnuInsertSetCursorPos_Click()
frmMain.InsertFunc "Ïåðåìåñòèòü êóðñîð(" & GetMarkerX & ", " & GetMarkerY & ")"
End Sub