-
Notifications
You must be signed in to change notification settings - Fork 0
/
frmMain.frm
778 lines (703 loc) · 22.9 KB
/
frmMain.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
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
VERSION 5.00
Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "MSWINSCK.OCX"
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
Begin VB.Form frmMain
BorderStyle = 0 'None
Caption = "Form1"
ClientHeight = 2535
ClientLeft = 105
ClientTop = 105
ClientWidth = 3000
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Icon = "frmMain.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2535
ScaleWidth = 3000
ShowInTaskbar = 0 'False
StartUpPosition = 3 'Windows Default
Begin VB.Timer Timer1
Interval = 350
Left = 870
Top = 1020
End
Begin MSWinsockLib.Winsock socket
Left = 2580
Top = 2130
_ExtentX = 741
_ExtentY = 741
_Version = 393216
End
Begin VB.PictureBox picExit
AutoSize = -1 'True
BorderStyle = 0 'None
Height = 150
Left = 2760
ScaleHeight = 150
ScaleWidth = 165
TabIndex = 22
Top = 75
Width = 165
End
Begin VB.PictureBox picHelp
AutoSize = -1 'True
BorderStyle = 0 'None
Height = 150
Left = 2550
ScaleHeight = 150
ScaleWidth = 165
TabIndex = 21
Top = 75
Width = 165
End
Begin VB.PictureBox picWrapUp
AutoSize = -1 'True
BorderStyle = 0 'None
Height = 150
Left = 300
ScaleHeight = 150
ScaleWidth = 165
TabIndex = 20
Top = 75
Width = 165
End
Begin VB.PictureBox picMinimize
AutoSize = -1 'True
BorderStyle = 0 'None
Height = 150
Left = 90
ScaleHeight = 150
ScaleWidth = 165
TabIndex = 19
Top = 75
Width = 165
End
Begin VB.TextBox txtSendIP
Appearance = 0 'Flat
Height = 255
Left = 1530
TabIndex = 15
Top = 390
Visible = 0 'False
Width = 1335
End
Begin VB.PictureBox picTitle
AutoSize = -1 'True
BorderStyle = 0 'None
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 0
ScaleHeight = 300
ScaleWidth = 3000
TabIndex = 0
Top = 0
Width = 3000
Begin VB.Label lblTitle
Alignment = 2 'Center
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "kNote 1.0"
BeginProperty Font
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 195
Left = 1095
TabIndex = 1
Top = 45
Width = 840
End
End
Begin VB.TextBox txtNoteToSend
Appearance = 0 'Flat
Height = 1365
Left = 120
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 12
Top = 720
Visible = 0 'False
Width = 2775
End
Begin VB.TextBox txtNote
Appearance = 0 'Flat
Height = 1425
Left = 120
Locked = -1 'True
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 4
Top = 660
Width = 2775
End
Begin VB.ListBox lstUsers
Appearance = 0 'Flat
Height = 1395
ItemData = "frmMain.frx":08CA
Left = 120
List = "frmMain.frx":08CC
TabIndex = 23
ToolTipText = "Double-click to send a user a note."
Top = 660
Visible = 0 'False
Width = 2745
End
Begin RichTextLib.RichTextBox txtLogData
Height = 1425
Left = 120
TabIndex = 26
Top = 660
Width = 2775
_ExtentX = 4895
_ExtentY = 2514
_Version = 393217
Enabled = -1 'True
ScrollBars = 2
Appearance = 0
TextRTF = $"frmMain.frx":08CE
End
Begin VB.Label lblAddUser
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "add user"
Height = 195
Left = 2220
TabIndex = 25
Top = 390
Visible = 0 'False
Width = 630
End
Begin VB.Label lblInfo3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "kNotes User List:"
Height = 195
Left = 150
TabIndex = 24
Top = 390
Visible = 0 'False
Width = 1215
End
Begin VB.Label lblInfo2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Log-File Data:"
Height = 195
Left = 150
TabIndex = 18
Top = 390
Visible = 0 'False
Width = 1005
End
Begin VB.Label lblMain
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "main"
Height = 195
Left = 150
TabIndex = 17
Top = 2250
Width = 330
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "|"
Height = 195
Left = 510
TabIndex = 16
Top = 2250
Width = 60
End
Begin VB.Label lblToIP
BackStyle = 0 'Transparent
Caption = "IP:"
Height = 225
Left = 1230
TabIndex = 14
Top = 420
Visible = 0 'False
Width = 705
End
Begin VB.Label lblSend
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = " Send It!"
Height = 195
Left = 150
TabIndex = 13
Top = 420
Visible = 0 'False
Width = 810
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "|"
Height = 195
Left = 2010
TabIndex = 11
Top = 2250
Width = 60
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "|"
Height = 195
Left = 1500
TabIndex = 10
Top = 2250
Width = 60
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "|"
Height = 195
Left = 870
TabIndex = 9
Top = 2250
Width = 60
End
Begin VB.Label lblUserBook
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "users"
Height = 195
Left = 1590
TabIndex = 8
Top = 2250
Width = 390
End
Begin VB.Label lblSendNote
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "send kNote"
Height = 195
Left = 2100
TabIndex = 7
Top = 2250
Width = 810
End
Begin VB.Label lblOpts
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "options"
Height = 195
Left = 960
TabIndex = 6
Top = 2250
Width = 525
End
Begin VB.Label lblLog
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "log"
Height = 195
Left = 630
TabIndex = 5
Top = 2250
Width = 210
End
Begin VB.Line Line1
X1 = 120
X2 = 2880
Y1 = 2190
Y2 = 2190
End
Begin VB.Label lblNoteFrom
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "n/a"
Height = 195
Left = 1080
TabIndex = 3
Top = 390
Width = 240
End
Begin VB.Label lblInfo1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "kNote From:"
Height = 195
Left = 150
TabIndex = 2
Top = 390
Width = 885
End
Begin VB.Shape shpMain
BackColor = &H00FFFFFF&
Height = 2265
Left = 0
Top = 270
Width = 3000
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private clsOnTop As New clskNote
Const portNum As Integer = 5233
Dim comMode As String
Private Sub Form_Load()
Dim iTemp As Integer
Dim tUser As String
Dim tIP As String
Dim X As Integer
Dim curSkin As String
Dim gotUName As String
Set clsOnTop = New clskNote
appDataPath = App.Path & "\appdata\main.ini"
userDataPath = App.Path & "\appdata\users.ini"
blockedPath = App.Path & "\appdata\blocked.ini"
curSkin = ReadINI("Skins", "curskin", appDataPath)
gotUName = ReadINI("General", "gotuname", appDataPath)
skinPath = App.Path & ReadINI("Skins", "path" & curSkin, appDataPath)
socket.LocalPort = portNum
socket.RemotePort = portNum
socket.Listen
comMode = "GENERAL"
frmMain.Top = 50
frmMain.Left = Screen.Width - frmMain.Width - 50
If Exists(App.Path & "\appdata\logfile.rtf") Then
txtLogData.LoadFile (App.Path & "\appdata\logfile.rtf")
End If
'get app data from INI Files
If Exists(appDataPath) Then
frmMain.Left = Val(ReadINI("General", "xPos", appDataPath))
frmMain.Top = Val(ReadINI("General", "yPos", appDataPath))
End If
If (gotUName = "0") Then
frmName.Top = frmMain.Top - 100
frmName.Left = frmMain.Left
clsOnTop.MakeTopMost frmName.hWnd
frmName.Show vbModal
clsOnTop.MakeNormal frmName.hWnd
ElseIf (gotUName = "1") Then
uName = ReadINI("General", "username", appDataPath)
End If
'get list of users from ini file
If Exists(userDataPath) Then
totUsers = Val(ReadINI("UserList", "numusers", userDataPath))
For X = 1 To totUsers
tUser = "user" & str(X)
tUser = ReadINI("UserList", "user" & Trim(str(X)), userDataPath)
tIP = ReadINI("UserList", "userip" & Trim(str(X)), userDataPath)
lstUsers.AddItem tUser & " - " & tIP
Next X
End If
'load skin
picTitle.Picture = LoadPicture(skinPath & "\titlesmall.gif")
picExit.Picture = LoadPicture(skinPath & "\x.gif")
picHelp.Picture = LoadPicture(skinPath & "\help.gif")
picWrapUp.Picture = LoadPicture(skinPath & "\wrapup.gif")
picMinimize.Picture = LoadPicture(skinPath & "\minimize.gif")
iTemp = ReadINI("General", "keepontop", appDataPath)
If CBool(iTemp) Then
clsOnTop.MakeTopMost Me.hWnd
End If
iTemp = ReadINI("General", "transwin", appDataPath)
If CBool(iTemp) Then
MakeTransparent Me.hWnd, 230
End If
'put stuff in system tray...
trayIcon.cbSize = Len(trayIcon)
trayIcon.hWnd = Me.hWnd
trayIcon.uId = vbNull
trayIcon.uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE
trayIcon.uCallBackMessage = WM_MOUSEMOVE
'This uses whatever Icon the Form Displays
trayIcon.hIcon = Me.Icon
'Tool Tip
trayIcon.szTip = "kNote" & vbNullChar
Call Shell_NotifyIcon(NIM_ADD, trayIcon)
Call Shell_NotifyIcon(NIM_MODIFY, trayIcon)
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Select Case X
Case 7755: 'Right Click
PopupMenu frmMenus.popMenu
Case 7725: 'Dbl Left Click
frmMain.Show
End Select
End Sub
Private Sub lblAddUser_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblAddUser.ForeColor = vbRed
If (frmMain.Left - frmOptions.Width < 0) Then
frmUserAdd.Left = frmMain.Left + frmMain.Width + 20
frmUserAdd.Top = frmMain.Top
frmUserAdd.Show
Exit Sub
Else
frmUserAdd.Left = frmMain.Left - frmUserAdd.Width - 20
frmUserAdd.Top = frmMain.Top
frmUserAdd.Show
End If
End Sub
Private Sub lblAddUser_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblAddUser.ForeColor = vbBlack
End Sub
Private Sub lblSend_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblSend.ForeColor = vbRed
If Trim(txtSendIP.Text) = "" Then
MsgBox "Please enter a valid destination IP/Hostname.", vbOKOnly, "Error"
lblSend.ForeColor = vbBlack
Exit Sub
End If
If Trim(Len(txtNoteToSend.Text)) > 1024 Then
MsgBox "Your kNote must be less than 1024 characters. Please shorten the message.", vbOKOnly, "Message Length"
lblSend.ForeColor = vbBlack
Exit Sub
End If
If (comMode <> "GENERAL") Then
MsgBox "kNote is currently busy. Please wait one minute and retry sending.", vbOKOnly, "Transfer in Progress"
lblSend.ForeColor = vbBlack
Exit Sub
End If
comMode = "SEND"
lblTitle.Caption = "sending kNote..."
socket.Close
' Sleep (1000)
DoEvents
socket.RemoteHost = txtSendIP.Text
socket.RemotePort = portNum
socket.Connect
DoEvents
End Sub
Private Sub lblSend_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblSend.ForeColor = vbBlack
End Sub
Private Sub lstUsers_DblClick()
Dim DataSplit() As String
DataSplit() = Split(lstUsers.Text, "-")
txtSendIP.Text = Trim(DataSplit(1))
lblInfo1.Visible = False
txtNote.Visible = False
lblNoteFrom.Visible = False
txtLogData.Visible = False
lblInfo2.Visible = False
lblSend.Visible = True
txtNoteToSend.Visible = True
txtSendIP.Visible = True
lblToIP.Visible = True
lblInfo3.Visible = False
lstUsers.Visible = False
End Sub
Private Sub lstUsers_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then
PopupMenu frmMenus.mnuUserList
End If
End Sub
Private Sub picExit_Click()
WriteINI "General", "xPos", str(frmMain.Left), appDataPath
WriteINI "General", "yPos", str(frmMain.Top), appDataPath
txtLogData.SaveFile App.Path & "\appdata\logfile.rtf"
UnloadAll
' do not forget to save setttings (like form pos) in ini file!
End Sub
Private Sub picMinimize_Click()
frmMain.Hide
End Sub
Private Sub picTitle_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
FormDrag Me
End Sub
Private Sub picWrapUp_Click()
If frmMain.Height <= picTitle.Height Then
frmMain.Height = 2535
Else
frmMain.Height = picTitle.Height
End If
End Sub
'various mousedowns/events===============================
Private Sub lblMain_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblMain.ForeColor = vbRed
lblInfo1.Visible = True
txtNote.Visible = True
lblNoteFrom.Visible = True
lblSend.Visible = False
txtNoteToSend.Visible = False
txtSendIP.Visible = False
lblToIP.Visible = False
txtLogData.Visible = False
lblInfo2.Visible = False
lblInfo3.Visible = False
lstUsers.Visible = False
lblAddUser.Visible = False
End Sub
Private Sub lblLog_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblLog.ForeColor = vbRed
lblInfo2.Visible = True
txtLogData.Visible = True
lblInfo1.Visible = False
txtNote.Visible = False
lblNoteFrom.Visible = False
lblSend.Visible = False
txtNoteToSend.Visible = False
txtSendIP.Visible = False
lblToIP.Visible = False
lblInfo3.Visible = False
lstUsers.Visible = False
lblAddUser.Visible = False
End Sub
Private Sub lblOpts_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblOpts.ForeColor = vbRed
frmOptions.Top = frmMain.Top
If (frmMain.Left - frmOptions.Width < 0) Then
frmOptions.Left = frmMain.Left + frmMain.Width + 20
frmOptions.Show
Exit Sub
Else
frmOptions.Left = frmMain.Left - frmOptions.Width - 20
frmOptions.Show
End If
End Sub
Private Sub lblSendNote_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblSendNote.ForeColor = vbRed
lblInfo1.Visible = False
txtNote.Visible = False
lblNoteFrom.Visible = False
txtLogData.Visible = False
lblInfo2.Visible = False
lblSend.Visible = True
txtNoteToSend.Visible = True
txtSendIP.Visible = True
lblToIP.Visible = True
lblInfo3.Visible = False
lstUsers.Visible = False
lblAddUser.Visible = False
End Sub
Private Sub lblUserBook_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim tUser As String
Dim tIP As String
lblUserBook.ForeColor = vbRed
lblInfo1.Visible = False
txtNote.Visible = False
lblNoteFrom.Visible = False
txtLogData.Visible = False
lblInfo2.Visible = False
lblSend.Visible = False
txtSendIP.Visible = False
lblToIP.Visible = False
txtNoteToSend.Visible = False
lstUsers.Visible = True
lblInfo3.Visible = True
lblAddUser.Visible = True
If Exists(userDataPath) Then
lstUsers.Clear
For X = 1 To totUsers
tUser = "user" & str(X)
tUser = ReadINI("UserList", "user" & Trim(str(X)), userDataPath)
tIP = ReadINI("UserList", "userip" & Trim(str(X)), userDataPath)
lstUsers.AddItem tUser & " - " & tIP
Next X
End If
End Sub
Private Sub lblTitle_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
FormDrag Me
End Sub
' mouse-ups that dont matter ==============================================
Private Sub lblLog_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblLog.ForeColor = vbBlack
End Sub
Private Sub lblOpts_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblOpts.ForeColor = vbBlack
End Sub
Private Sub lblMain_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblMain.ForeColor = vbBlack
End Sub
Private Sub lblSendNote_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblSendNote.ForeColor = vbBlack
End Sub
Private Sub lblUserBook_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblUserBook.ForeColor = vbBlack
End Sub
Private Sub socket_Close()
If socket.State <> sckClosed Then socket.Close
End Sub
Private Sub socket_Connect()
If comMode = "SEND" Then
socket.SendData "RECVMODE"
End If
End Sub
Private Sub socket_ConnectionRequest(ByVal requestID As Long)
If socket.State <> sckClosed Then socket.Close
socket.Accept requestID
End Sub
Private Sub socket_DataArrival(ByVal bytesTotal As Long)
Dim data As String
Dim DataSplit() As String
socket.GetData data
If (data = "RECVMODE") Then
comMode = "RECV"
socket.SendData "NAMEPLZ"
Exit Sub
End If
If (comMode = "SEND") Then
Select Case data
Case "NAMEPLZ"
socket.SendData "NAME," & uName
Exit Sub
Case "TXTPLZ"
socket.SendData txtNoteToSend.Text
comMode = "GENERAL"
lblTitle.Caption = "kNote 1.0"
socket.Close
socket.Listen
Exit Sub
End Select
End If
If (comMode = "RECV") Then
DataSplit() = Split(data, ",")
Select Case DataSplit(0)
Case "NAME"
lblTitle.Caption = "receiving kNote..."
lblNoteFrom.Caption = Trim(DataSplit(1))
txtLogData.Text = txtLogData.Text & DataSplit(1) & " - "
txtLogData.Text = txtLogData.Text & socket.RemoteHostIP & vbCrLf & "======================" & vbCrLf
socket.SendData "TXTPLZ"
Exit Sub
Case Else
txtNote.Text = DataSplit(0)
txtLogData.Text = txtLogData.Text & DataSplit(0)
socket.SendData "XDONE"
comMode = "GENERAL"
lblTitle.Caption = "kNote 1.0"
socket.Close
socket.Listen
End Select
End If
End Sub
Private Sub socket_Error(ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)
socket.Close
socket.Listen
End Sub
Private Sub Timer1_Timer()
lblTitle.Caption = socket.State
End Sub