-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathForm1.frm
388 lines (358 loc) · 11.3 KB
/
Form1.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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "comdlg32.ocx"
Begin VB.Form Form1
AutoRedraw = -1 'True
BackColor = &H00C0C0C0&
Caption = "Notepad++"
ClientHeight = 6780
ClientLeft = 165
ClientTop = 825
ClientWidth = 12480
Icon = "Form1.frx":0000
LinkTopic = "Form1"
ScaleHeight = 6780
ScaleWidth = 12480
StartUpPosition = 3 'Windows Default
WindowState = 2 'Maximized
Begin MSComctlLib.ImageList ImageList1
Left = 8520
Top = 5280
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 8
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Form1.frx":0442
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Form1.frx":0554
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Form1.frx":0666
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Form1.frx":0778
Key = ""
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Form1.frx":088A
Key = ""
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Form1.frx":099C
Key = ""
EndProperty
BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Form1.frx":0AAE
Key = ""
EndProperty
BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Form1.frx":0BC0
Key = ""
EndProperty
EndProperty
End
Begin MSComctlLib.StatusBar sbar
Align = 2 'Align Bottom
Height = 375
Left = 0
TabIndex = 2
ToolTipText = "Status Bar"
Top = 6405
Visible = 0 'False
Width = 12480
_ExtentX = 22013
_ExtentY = 661
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 2
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Object.Width = 17639
MinWidth = 17639
Text = "Press F1 for help"
TextSave = "Press F1 for help"
EndProperty
BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Object.Width = 3528
MinWidth = 3528
EndProperty
EndProperty
End
Begin MSComctlLib.Toolbar tb
Align = 1 'Align Top
Height = 420
Left = 0
TabIndex = 1
Top = 0
Width = 12480
_ExtentX = 22013
_ExtentY = 741
ButtonWidth = 609
ButtonHeight = 582
Appearance = 1
ImageList = "ImageList1"
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 8
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "new"
Object.ToolTipText = "New"
ImageIndex = 1
MixedState = -1 'True
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "open"
Object.ToolTipText = "Open"
ImageIndex = 2
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "save"
Object.ToolTipText = "Save"
ImageIndex = 3
EndProperty
BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "print"
Object.ToolTipText = "Print"
ImageIndex = 4
EndProperty
BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "cut"
Object.ToolTipText = "Cut"
ImageIndex = 5
EndProperty
BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "copy"
Object.ToolTipText = "Copy"
ImageIndex = 6
EndProperty
BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "paste"
Object.ToolTipText = "Paste"
ImageIndex = 7
EndProperty
BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "time"
Object.ToolTipText = "Time/Date"
ImageIndex = 8
EndProperty
EndProperty
End
Begin MSComDlg.CommonDialog cmdg
Left = 1080
Top = 5280
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin RichTextLib.RichTextBox rtb
Height = 3375
HelpContextID = 1
Left = 840
TabIndex = 0
ToolTipText = "Text Box"
Top = 1560
Width = 9735
_ExtentX = 17171
_ExtentY = 5953
_Version = 393217
Enabled = -1 'True
ScrollBars = 2
TextRTF = $"Form1.frx":1012
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 24
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.Menu file
Caption = "&File"
Begin VB.Menu new
Caption = "New"
Shortcut = ^N
End
Begin VB.Menu open
Caption = "Open"
Shortcut = ^O
End
Begin VB.Menu save
Caption = "Save"
Shortcut = ^S
End
Begin VB.Menu saveas
Caption = "Save As"
End
Begin VB.Menu print
Caption = "Print"
Shortcut = ^P
End
Begin VB.Menu exit
Caption = "Exit"
End
End
Begin VB.Menu edit
Caption = "&Edit"
Begin VB.Menu cut
Caption = "Cut"
Shortcut = ^X
End
Begin VB.Menu copy
Caption = "Copy"
Shortcut = ^C
End
Begin VB.Menu paste
Caption = "Paste"
Shortcut = ^V
End
Begin VB.Menu time
Caption = "Time&Date"
Shortcut = {F5}
End
End
Begin VB.Menu format
Caption = "&Format"
Begin VB.Menu font
Caption = "Font"
End
Begin VB.Menu color
Caption = "Color"
End
End
Begin VB.Menu view
Caption = "&View"
Begin VB.Menu status
Caption = "Status Bar"
End
End
Begin VB.Menu help
Caption = "&Help"
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub color_Click()
cmdg.ShowColor
rtb.SelColor = cmdg.color
End Sub
Private Sub Command1_Click()
Dim n As Integer
n = InputBox("What to find?", vbOKCancel)
End Sub
Private Sub copy_Click()
Clipboard.Clear
Clipboard.SetText rtb.SelText, vbCFText
End Sub
Private Sub cut_Click()
Clipboard.Clear
Clipboard.SetText rtb.SelText, vbCFText
rtb.SelText = ""
End Sub
Private Sub exit_Click()
Dim n As Integer
n = MsgBox("Are you Sure?", vbYesNo + vbQuestion, "Exit")
If n = vbYes Then
End
End If
End Sub
Private Sub font_Click()
cmdg.Flags = &H3
cmdg.ShowFont
rtb.SelFontName = cmdg.FontName
rtb.SelFontSize = cmdg.FontSize
rtb.SelBold = cmdg.FontBold
rtb.SelUnderline = cmdg.FontUnderline
rtb.SelItalic = cmdg.FontItalic
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
sbar.Panels(2) = X & " , " & Y
End Sub
Private Sub Form_Resize()
rtb.Left = 0
rtb.Top = tb.Height + 100
rtb.Height = Form1.ScaleHeight
rtb.Width = Form1.ScaleWidth
End Sub
Private Sub help_Click()
Dim s As Integer
s = MsgBox("Please check help registry", vbOKOnly, "Error")
End Sub
Private Sub new_Click()
rtb.Text = " "
End Sub
Private Sub open_Click()
cmdg.ShowOpen
rtb.LoadFile cmdg.FileName
End Sub
Private Sub paste_Click()
rtb.SelText = Clipboard.GetText(vbCFText)
End Sub
Private Sub print_Click()
cmdg.Flags = cdlCFBoth
cmdg.ShowPrinter
End Sub
Private Sub rtb_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
sbar.Panels(2) = X & " , " & Y
End Sub
Private Sub save_Click()
cmdg.DefaultExt = "txt"
cmdg.Filter = "txt files|*.txt"
cmdg.ShowSave
rtb.SaveFile cmdg.FileName, txtTXT
cmdg.Flags = cdlOFNOverwritePrompt
End Sub
Private Sub saveas_Click()
cmdg.DefaultExt = "txt"
cmdg.Filter = "txt files|*.txt"
cmdg.ShowSave
rtb.SaveFile cmdg.FileName, txtTXT
End Sub
Private Sub status_Click()
sbar.Visible = True
End Sub
Private Sub tb_ButtonClick(ByVal Button As MSComctlLib.Button)
If Button.Index = 1 Then
rtb.Text = " "
ElseIf Button.Index = 2 Then
cmdg.ShowOpen
rtb.LoadFile cmdg.FileName
ElseIf Button.Index = 3 Then
cmdg.DefaultExt = "txt"
cmdg.Filter = "txt files|*.txt"
cmdg.ShowSave
rtb.SaveFile cmdg.FileName, txtTXT
cmdg.Flags = cdlOFNOverwritePrompt
ElseIf Button.Index = 4 Then
cmdg.Flags = cdlCFBoth
cmdg.ShowPrinter
ElseIf Button.Index = 5 Then
Clipboard.Clear
Clipboard.SetText rtb.SelText, vbCFText
rtb.SelText = ""
ElseIf Button.Index = 6 Then
Clipboard.Clear
Clipboard.SetText rtb.SelText, vbCFText
ElseIf Button.Index = 7 Then
rtb.SelText = Clipboard.GetText(vbCFText)
ElseIf Button.Index = 8 Then
rtb.SelText = Now
End If
End Sub
Private Sub time_Click()
rtb.SelText = Now
End Sub