-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathfrmAction.frm
725 lines (625 loc) · 20.7 KB
/
frmAction.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
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT3N.OCX"
Begin VB.Form frmAction
BorderStyle = 1 'Fixed Single
Caption = "Action Editor"
ClientHeight = 6900
ClientLeft = 45
ClientTop = 330
ClientWidth = 6285
Icon = "frmAction.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
ScaleHeight = 6900
ScaleWidth = 6285
Begin VB.TextBox txtOffset
Enabled = 0 'False
Height = 285
Left = 1680
Locked = -1 'True
TabIndex = 30
Top = 6540
Width = 975
End
Begin VB.CheckBox chkAutoSave
Caption = "Auto-Save"
Height = 195
Left = 3300
TabIndex = 29
Top = 60
Value = 1 'Checked
Width = 1155
End
Begin VB.CommandButton cmdDiscard
Caption = "Dis&card"
Height = 315
Left = 5340
TabIndex = 5
Top = 0
Width = 855
End
Begin VB.CommandButton cmdSave
Caption = "&Save"
Height = 315
Left = 4500
TabIndex = 4
Top = 0
Width = 855
End
Begin VB.TextBox txtGoto
Height = 285
Left = 60
MaxLength = 28
TabIndex = 0
Top = 60
Width = 1515
End
Begin VB.CommandButton cmdDelete
Caption = "&Delete"
Height = 315
Left = 2400
TabIndex = 3
Top = 0
Width = 795
End
Begin VB.CommandButton cmdInsert
Caption = "&Insert"
Height = 315
Left = 1680
TabIndex = 2
Top = 0
Width = 735
End
Begin VB.TextBox txtFloorItemToRoom
Height = 285
Left = 1680
MaxLength = 74
TabIndex = 27
Top = 6000
Width = 4455
End
Begin VB.TextBox txtFloorItemToUser
Height = 285
Left = 1680
MaxLength = 74
TabIndex = 25
Top = 5460
Width = 4455
End
Begin VB.TextBox txtInventoryToRoom
Height = 285
Left = 1680
MaxLength = 74
TabIndex = 23
Top = 4920
Width = 4455
End
Begin VB.TextBox txtInventoryToUser
Height = 285
Left = 1680
MaxLength = 74
TabIndex = 21
Top = 4380
Width = 4455
End
Begin VB.TextBox txtMonsterToRoom
Height = 285
Left = 1680
MaxLength = 74
TabIndex = 19
Top = 3840
Width = 4455
End
Begin VB.TextBox txtMonsterToUser
Height = 285
Left = 1680
MaxLength = 74
TabIndex = 17
Top = 3300
Width = 4455
End
Begin VB.TextBox txtUserToRoom
Height = 285
Left = 1680
MaxLength = 74
TabIndex = 15
Top = 2760
Width = 4455
End
Begin VB.TextBox txtUserToOtherUser
Height = 285
Left = 1680
MaxLength = 74
TabIndex = 13
Top = 2220
Width = 4455
End
Begin VB.TextBox txtUserToUser
Height = 285
Left = 1680
MaxLength = 74
TabIndex = 11
Top = 1680
Width = 4455
End
Begin VB.TextBox txtSingleToRoom
Height = 285
Left = 1680
MaxLength = 74
TabIndex = 9
Top = 1140
Width = 4455
End
Begin VB.TextBox txtSingleToUser
Height = 285
Left = 1680
MaxLength = 74
TabIndex = 7
Top = 600
Width = 4455
End
Begin MSComctlLib.ListView lvDatabase
Height = 5895
Left = 60
TabIndex = 1
Top = 420
Width = 1515
_ExtentX = 2672
_ExtentY = 10398
View = 3
LabelEdit = 1
LabelWrap = -1 'True
HideSelection = 0 'False
FullRowSelect = -1 'True
GridLines = -1 'True
_Version = 393217
ForeColor = -2147483640
BackColor = -2147483643
Appearance = 1
NumItems = 0
End
Begin VB.TextBox txtActionCommand
Height = 315
Left = 1200
TabIndex = 28
Text = "Text1"
Top = 0
Visible = 0 'False
Width = 2055
End
Begin VB.Label Label1
Caption = "Offset (Debug)"
Height = 255
Left = 1680
TabIndex = 31
Top = 6300
Width = 1455
End
Begin VB.Label Label11
Caption = "Floor Item to Room (EX: %s peed on the %s!)"
Height = 255
Left = 1680
TabIndex = 26
Top = 5760
Width = 4455
End
Begin VB.Label Label10
Caption = "Floor Item to User (EX: You pee on the %s!)"
Height = 255
Left = 1680
TabIndex = 24
Top = 5220
Width = 4455
End
Begin VB.Label Label9
Caption = "Inventory to Room (EX: %s peed on his %s!)"
Height = 255
Left = 1680
TabIndex = 22
Top = 4680
Width = 4455
End
Begin VB.Label Label8
Caption = "Inventory to User (EX: You pee on your %s!)"
Height = 255
Left = 1680
TabIndex = 20
Top = 4140
Width = 4455
End
Begin VB.Label Label7
Caption = "Monster to Room (EX: %s peed on the %s!)"
Height = 255
Left = 1680
TabIndex = 18
Top = 3600
Width = 4455
End
Begin VB.Label Label6
Caption = "Monster to User (EX: You pee on the %s!)"
Height = 255
Left = 1680
TabIndex = 16
Top = 3060
Width = 4455
End
Begin VB.Label Label5
Caption = "User to Room (EX: %s peed on %s!)"
Height = 255
Left = 1680
TabIndex = 14
Top = 2520
Width = 4455
End
Begin VB.Label Label4
Caption = "User to Other User (EX: %s peed on you!)"
Height = 255
Left = 1680
TabIndex = 12
Top = 1980
Width = 4455
End
Begin VB.Label Label3
Caption = "User to User (EX: You pee on %s!)"
Height = 255
Left = 1680
TabIndex = 10
Top = 1440
Width = 4455
End
Begin VB.Label Label2
Caption = "Single to Room (EX: %s peed on everyone!)"
Height = 255
Left = 1680
TabIndex = 8
Top = 900
Width = 4455
End
Begin VB.Label labelxx
Caption = "Single to User (EX: You pee on everyone!)"
Height = 255
Left = 1680
TabIndex = 6
Top = 360
Width = 4455
End
End
Attribute VB_Name = "frmAction"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Base 0
Option Explicit
Dim bLoaded As Boolean
Private Sub Form_Load()
On Error Resume Next
Me.Top = ReadINI("Windows", "ActionTop")
Me.Left = ReadINI("Windows", "ActionLeft")
bLoaded = False
lvDatabase.ListItems.clear
Call LoadActions
Me.Show
Me.SetFocus
txtGoto.SetFocus
If ReadINI("Windows", "ActionMaxed") = "1" Then Me.WindowState = vbMaximized
End Sub
Private Sub LoadActions()
On Error GoTo error:
Dim nStatus As Integer
lvDatabase.ColumnHeaders.clear
lvDatabase.ColumnHeaders.add 1, "Action", "Action", 1000, lvwColumnLeft
nStatus = BTRCALL(BGETFIRST, ActionPosBlock, ActionDatabuf, Len(ActionDatabuf), ByVal ActionKeyBuffer, KEY_BUF_LEN, 0)
If Not nStatus = 0 Then
MsgBox "LoadAction, BGETFIRST, Action, Error: " & BtrieveErrorCode(nStatus)
Exit Sub
End If
Do While nStatus = 0
ActionRowToStruct ActionDatabuf.buf
Call AddActionToLV(Actionrec.Name)
nStatus = BTRCALL(BGETNEXT, ActionPosBlock, ActionDatabuf, Len(ActionDatabuf), ByVal ActionKeyBuffer, KEY_BUF_LEN, 0)
Loop
If Not nStatus = 0 And Not nStatus = 9 Then
MsgBox "LoadActions, Error: " & BtrieveErrorCode(nStatus)
End If
lvDatabase.refresh
SortListView lvDatabase, 1, ldtString, True
If lvDatabase.ListItems.Count >= 1 Then Call lvDatabase_ItemClick(lvDatabase.ListItems(1))
bLoaded = True
Exit Sub
error:
Call HandleError
End Sub
Private Sub AddActionToLV(ByVal sAction As String)
Dim nStatus As Integer, oLI As ListItem, sGoto As String * 30
On Error GoTo error:
If Not sAction = Actionrec.Name Then
sGoto = sAction & Chr(0)
nStatus = BTRCALL(BGETEQUAL, ActionPosBlock, ActionDatabuf, Len(ActionDatabuf), ByVal sGoto, KEY_BUF_LEN, 0)
If Not nStatus = 0 Then MsgBox "Error getting action '" & sAction & "': " & BtrieveErrorCode(nStatus)
bLoaded = False
Exit Sub
End If
Set oLI = lvDatabase.ListItems.add()
oLI.Text = Actionrec.Name
Set oLI = Nothing
Exit Sub
error:
Call HandleError
Set oLI = Nothing
End Sub
Private Sub cmdDiscard_Click()
Dim nStatus As Integer, sGoto As String * 30
sGoto = txtActionCommand & Chr(0)
nStatus = BTRCALL(BGETEQUAL, ActionPosBlock, ActionDatabuf, Len(ActionDatabuf), ByVal sGoto, KEY_BUF_LEN, 0)
If Not nStatus = 0 Then
MsgBox "cmdGoto_Click(), BGETEQUAL, Action, Error: " & BtrieveErrorCode(nStatus)
bLoaded = False
Else
DispActionInfo ActionDatabuf.buf
bLoaded = True
End If
End Sub
Private Sub cmdSave_Click()
Dim nStatus As Integer, sGoto As String * 30
If bDisableWriting = True Then MsgBox "Writing Currently Disabled -- Check out the File menu.", vbInformation: Exit Sub
Call SaveAction
sGoto = txtActionCommand & Chr(0)
nStatus = BTRCALL(BGETEQUAL, ActionPosBlock, ActionDatabuf, Len(ActionDatabuf), ByVal sGoto, KEY_BUF_LEN, 0)
If Not nStatus = 0 Then
MsgBox "cmdGoto_Click(), BGETEQUAL, Action, Error: " & BtrieveErrorCode(nStatus)
Else
DispActionInfo ActionDatabuf.buf
End If
End Sub
Private Sub DispActionInfo(row() As Byte)
On Error GoTo error:
bLoaded = True
RowToStruct row, ActionFldMap, Actionrec, LenB(Actionrec)
Me.Caption = "Action Editor -- " & ClipNull(Actionrec.Name)
txtActionCommand.Text = Actionrec.Name
txtSingleToUser.Text = Actionrec.SingleToUser
txtSingleToRoom.Text = Actionrec.SingleToRoom
txtUserToUser.Text = Actionrec.UserToUser
txtUserToOtherUser.Text = Actionrec.UserToOtherUser
txtUserToRoom.Text = Actionrec.UserToRoom
txtMonsterToUser.Text = Actionrec.MonsterToUser
txtMonsterToRoom.Text = Actionrec.MonsterToRoom
txtInventoryToUser.Text = Actionrec.InventoryToUser
txtInventoryToRoom.Text = Actionrec.InventoryToRoom
txtFloorItemToUser.Text = Actionrec.FloorItemToUser
txtFloorItemToRoom.Text = Actionrec.FloorItemToRoom
UpdateOffsetValue
Exit Sub
error:
Call HandleError
MsgBox "Warning, record was not completely displayed." & vbCrLf _
& "Previous records stats may still be in memory. Select 'Disable DB Writing'" & vbCrLf _
& "from the file menu and then reload the editor.", vbExclamation
End Sub
Private Sub SaveAction()
On Error GoTo error:
Dim nStatus As Integer, sGoto As String * 30
sGoto = txtActionCommand.Text & Chr(0)
nStatus = BTRCALL(BGETEQUAL, ActionPosBlock, ActionDatabuf, Len(ActionDatabuf), ByVal sGoto, KEY_BUF_LEN, 0)
If Not nStatus = 0 Then
MsgBox "Save Error, BGETEQUAL, Action, Error: " & BtrieveErrorCode(nStatus)
Exit Sub
End If
ActionRowToStruct ActionDatabuf.buf
'DoEvents
Actionrec.SingleToUser = RTrim(txtSingleToUser.Text) & Chr(0)
Actionrec.SingleToRoom = RTrim(txtSingleToRoom.Text) & Chr(0)
Actionrec.UserToUser = RTrim(txtUserToUser.Text) & Chr(0)
Actionrec.UserToOtherUser = RTrim(txtUserToOtherUser.Text) & Chr(0)
Actionrec.UserToRoom = RTrim(txtUserToRoom.Text) & Chr(0)
Actionrec.MonsterToUser = RTrim(txtMonsterToUser.Text) & Chr(0)
Actionrec.MonsterToRoom = RTrim(txtMonsterToRoom.Text) & Chr(0)
Actionrec.InventoryToUser = RTrim(txtInventoryToUser.Text) & Chr(0)
Actionrec.InventoryToRoom = RTrim(txtInventoryToRoom.Text) & Chr(0)
Actionrec.FloorItemToUser = RTrim(txtFloorItemToUser.Text) & Chr(0)
Actionrec.FloorItemToRoom = RTrim(txtFloorItemToRoom.Text) & Chr(0)
UpdateOffsetValue
Actionrec.Offset = txtOffset.Text
UpdateActionRecord
Exit Sub
error:
Call HandleError
End Sub
Private Sub UpdateOffsetValue()
Dim tmpOffset As Byte
tmpOffset = 0
If Len(txtSingleToUser.Text) > 0 Or Len(txtSingleToUser.Text) > 0 Then
tmpOffset = tmpOffset + 1
End If
If Len(txtUserToUser.Text) > 0 Or Len(txtUserToOtherUser.Text) > 0 Or Len(txtUserToRoom.Text) > 0 Then
tmpOffset = tmpOffset + 2
End If
If Len(txtMonsterToUser.Text) > 0 Or Len(txtMonsterToRoom.Text) > 0 Then
tmpOffset = tmpOffset + 4
End If
If Len(txtInventoryToUser.Text) > 0 Or Len(txtInventoryToRoom.Text) > 0 Then
tmpOffset = tmpOffset + 8
End If
If Len(txtFloorItemToUser.Text) > 0 Or Len(txtFloorItemToRoom.Text) > 0 Then
tmpOffset = tmpOffset + 16
End If
txtOffset.Text = tmpOffset
Exit Sub
error:
Call HandleError
End Sub
Private Sub UpdateActionRecord()
Dim nStatus As Integer
nStatus = UpdateAction
If Not nStatus = 0 Then
MsgBox "Update ActiOn Error: " & BtrieveErrorCode(nStatus)
Else
DispActionInfo ActionDatabuf.buf
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
If bLoaded = True Then SaveAction
If Me.WindowState = vbMinimized Then Exit Sub
If Me.WindowState = vbMaximized Then
Call WriteINI("Windows", "ActionMaxed", 1)
Else
Call WriteINI("Windows", "ActionMaxed", 0)
Call WriteINI("Windows", "ActionTop", Me.Top)
Call WriteINI("Windows", "ActionLeft", Me.Left)
End If
End Sub
Private Sub cmdDelete_Click()
On Error GoTo error:
Dim nStatus As Integer
Dim nDelete As Integer, temp As Long, strTemp As String * 30
If bDisableWriting = True Then MsgBox "Writing Currently Disabled -- Check out the File menu.", vbInformation: Exit Sub
nDelete = MsgBox("Delete this record from database?", vbYesNo, "Delete Record?")
If Not nDelete = vbYes Then Exit Sub
If bLoaded Then Call SaveAction
temp = lvDatabase.SelectedItem.Index
strTemp = txtActionCommand.Text & Chr(0)
nStatus = BTRCALL(BGETEQUAL, ActionPosBlock, ActionDatabuf, Len(ActionDatabuf), ByVal strTemp, KEY_BUF_LEN, 0)
If nStatus = 0 Then
nStatus = BTRCALL(BDELETE, ActionPosBlock, ActionDatabuf, Len(ActionDatabuf), ByVal ActionKeyBuffer, KEY_BUF_LEN, 0)
If Not nStatus = 0 Then
MsgBox "cmdDelete, BDELETE, Error: " & BtrieveErrorCode(nStatus)
Else
lvDatabase.ListItems.Remove temp
bLoaded = False
If lvDatabase.ListItems.Count >= 1 Then
If temp > 1 Then temp = temp - 1 Else temp = 1
Set lvDatabase.SelectedItem = lvDatabase.ListItems(temp)
lvDatabase.SelectedItem.EnsureVisible
Call lvDatabase_ItemClick(lvDatabase.SelectedItem)
Else
Call Form_Unload(1)
Call Form_Load
End If
End If
Else
MsgBox "Couldn't get record, Error: " & BtrieveErrorCode(nStatus)
End If
Exit Sub
error:
Call HandleError
End Sub
Private Sub cmdInsert_Click()
On Error GoTo error:
Dim nStatus As Integer, sGoto As String, oLI As ListItem
Dim nNewActionName As String
If bLoaded = True Then SaveAction
If bDisableWriting = True Then MsgBox "Writing Currently Disabled -- Check out the File menu.", vbInformation: Exit Sub
nNewActionName = InputBox("New Action Name:", "Insert", "")
If nNewActionName = "" Then Exit Sub
Actionrec.Name = nNewActionName & Chr(0)
ActionStructToRow ActionDatabuf.buf
nStatus = BTRCALL(BINSERT, ActionPosBlock, ActionDatabuf, Len(ActionDatabuf), ByVal ActionKeyBuffer, KEY_BUF_LEN, 0)
If Not nStatus = 0 Then
MsgBox "cmdInsert, BINSERT, Error: " & BtrieveErrorCode(nStatus)
Else
ActionRowToStruct ActionDatabuf.buf
Call AddActionToLV(Actionrec.Name)
DispActionInfo ActionDatabuf.buf
SortListView lvDatabase, 1, ldtString, True
Set oLI = lvDatabase.FindItem(Actionrec.Name, lvwText, , 0)
If Not oLI Is Nothing Then
Set lvDatabase.SelectedItem = oLI
lvDatabase.SelectedItem.EnsureVisible
Call lvDatabase_ItemClick(lvDatabase.SelectedItem)
Set oLI = Nothing
Else
Set lvDatabase.SelectedItem = lvDatabase.ListItems(lvDatabase.ListItems.Count)
lvDatabase.SelectedItem.EnsureVisible
Call lvDatabase_ItemClick(lvDatabase.SelectedItem)
End If
' '''''
'
' sGoto = nNewActionName & Chr(0)
' nStatus = BTRCALL(BGETEQUAL, ActionPosBlock, ActionDatabuf, Len(ActionDatabuf), ByVal sGoto, KEY_BUF_LEN, 0)
' If Not nStatus = 0 Then
' MsgBox "cmdGoto_Click(), BGETEQUAL, Action, Error: " & BtrieveErrorCode(nStatus)
' Else
' DispActionInfo ActionDatabuf.buf
' End If
End If
Exit Sub
error:
Call HandleError
Set oLI = Nothing
End Sub
Private Sub lvDatabase_ColumnClick(ByVal ColumnHeader As MSComctlLib.ColumnHeader)
SortListView lvDatabase, ColumnHeader.Index, ldtString, lvDatabase.SortOrder
End Sub
Private Sub lvDatabase_ItemClick(ByVal Item As MSComctlLib.ListItem)
Dim strTemp As String * 30, nStatus As Integer
If bLoaded = True And chkAutoSave.Value = 1 Then Call SaveAction
strTemp = Item.Text & Chr(0)
nStatus = BTRCALL(BGETEQUAL, ActionPosBlock, ActionDatabuf, Len(ActionDatabuf), ByVal strTemp, KEY_BUF_LEN, 0)
If Not nStatus = 0 Then
MsgBox "Error on BGETEQUAL: " & BtrieveErrorCode(nStatus)
bLoaded = False
Else
DispActionInfo ActionDatabuf.buf
bLoaded = True
End If
End Sub
Private Sub txtFloorItemToRoom_GotFocus()
Call SelectAll(txtFloorItemToRoom)
End Sub
Private Sub txtFloorItemToUser_GotFocus()
Call SelectAll(txtFloorItemToUser)
End Sub
Private Sub txtGoto_GotFocus()
Call SelectAll(txtGoto)
End Sub
Private Sub txtGoto_KeyUp(KeyCode As Integer, Shift As Integer)
Dim x As Long, SearchStart As Long
If txtGoto.Text = "" Then Exit Sub
If lvDatabase.ListItems.Count < 1 Then Exit Sub
SearchStart = 1
If KeyCode = vbKeyUp Then Exit Sub
If KeyCode = vbKeyDown Then lvDatabase.SetFocus
If KeyCode = vbKeyLeft Then Exit Sub
If KeyCode = vbKeyRight Then SearchStart = lvDatabase.SelectedItem.Index + 1
If KeyCode = vbKeyControl Then Exit Sub 'control
If KeyCode = 18 Then Exit Sub 'alt
If KeyCode = vbKeyTab Then Exit Sub 'tab
If KeyCode = vbKeyShift Then Exit Sub
For x = SearchStart To lvDatabase.ListItems.Count
If Not InStr(1, LCase(lvDatabase.ListItems(x)), LCase(txtGoto.Text)) = 0 Then
Set lvDatabase.SelectedItem = lvDatabase.ListItems(x)
lvDatabase.SelectedItem.EnsureVisible
Call lvDatabase_ItemClick(lvDatabase.SelectedItem)
Exit For
End If
Next x
End Sub
Private Sub txtInventoryToRoom_GotFocus()
Call SelectAll(txtInventoryToRoom)
End Sub
Private Sub txtInventoryToUser_GotFocus()
Call SelectAll(txtInventoryToUser)
End Sub
Private Sub txtMonsterToRoom_GotFocus()
Call SelectAll(txtMonsterToRoom)
End Sub
Private Sub txtMonsterToUser_GotFocus()
Call SelectAll(txtMonsterToUser)
End Sub
Private Sub txtSingleToRoom_GotFocus()
Call SelectAll(txtSingleToRoom)
End Sub
Private Sub txtSingleToUser_GotFocus()
Call SelectAll(txtSingleToUser)
End Sub
Private Sub txtUserToOtherUser_GotFocus()
Call SelectAll(txtUserToOtherUser)
End Sub
Private Sub txtUserToRoom_GotFocus()
Call SelectAll(txtUserToRoom)
End Sub
Private Sub txtUserToUser_GotFocus()
Call SelectAll(txtUserToUser)
End Sub