-
Notifications
You must be signed in to change notification settings - Fork 32
/
TabOrder.frm
868 lines (768 loc) · 27.7 KB
/
TabOrder.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
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
VERSION 5.00
Begin VB.Form frmTabOrder
BorderStyle = 5 'Sizable ToolWindow
Caption = "TabOrder Assistant"
ClientHeight = 1590
ClientLeft = 60
ClientTop = 300
ClientWidth = 2745
Icon = "TabOrder.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1590
ScaleWidth = 2745
ShowInTaskbar = 0 'False
StartUpPosition = 1 'CenterOwner
Begin VB.ListBox lstTabIndex
DragIcon = "TabOrder.frx":014A
Height = 285
IntegralHeight = 0 'False
Left = 0
TabIndex = 6
ToolTipText = "List of controls and their tab order"
Top = 345
Width = 2025
End
Begin VB.CommandButton cmdApply
Height = 330
Left = 400
Picture = "TabOrder.frx":058C
Style = 1 'Graphical
TabIndex = 5
ToolTipText = "Apply all the modifications"
Top = 0
UseMaskColor = -1 'True
Width = 330
End
Begin VB.CommandButton cmdUp
Height = 330
Left = 735
Picture = "TabOrder.frx":068E
Style = 1 'Graphical
TabIndex = 4
ToolTipText = "Move this control up in the tab order"
Top = 0
UseMaskColor = -1 'True
Width = 330
End
Begin VB.CommandButton cmdDown
Height = 330
Left = 1065
Picture = "TabOrder.frx":0790
Style = 1 'Graphical
TabIndex = 3
ToolTipText = "Move this control down in the tab order"
Top = 0
UseMaskColor = -1 'True
Width = 330
End
Begin VB.CommandButton cmdTopToBottom
Height = 330
Left = 1395
Picture = "TabOrder.frx":0892
Style = 1 'Graphical
TabIndex = 2
ToolTipText = "Refresh the list from top to bottom"
Top = 0
UseMaskColor = -1 'True
Width = 330
End
Begin VB.CommandButton cmdLeftToRight
Height = 330
Left = 1725
Picture = "TabOrder.frx":0994
Style = 1 'Graphical
TabIndex = 1
ToolTipText = "Refresh list from left to right"
Top = 0
UseMaskColor = -1 'True
Width = 330
End
Begin VB.CommandButton cmdRefresh
Height = 330
Left = 65
Picture = "TabOrder.frx":0A96
Style = 1 'Graphical
TabIndex = 0
ToolTipText = "Refresh the list"
Top = 0
UseMaskColor = -1 'True
Width = 330
End
End
Attribute VB_Name = "frmTabOrder"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' #VBIDEUtils#************************************************************
' * Programmer Name : removed
' * Web Site : http://www.ppreview.net
' * E-Mail : removed
' * Date : 28/10/1999
' * Time : 11:42
' * Module Name : docTabOrder
' * Module Filename : Taborder.dob
' **********************************************************************
' * Comments :
' *
' *
' **********************************************************************
Option Explicit
Dim mcmpCurrentForm As VBComponent 'current form
Dim mcolCtls As VBControls 'form's controls
Private clsTooltips As New class_Tooltips
'refresh types
Const NEWFORM = 0
Const TOPTOBOTTOM = 1
Const LEFTTORIGHT = 2
Const REFRESHCTLS = 3
Private Sub cmdApply_Click()
' #VBIDEUtils#************************************************************
' * Programmer Name : removed
' * Web Site : http://www.ppreview.net
' * E-Mail : removed
' * Date : 28/10/1999
' * Time : 11:42
' * Module Name : docTabOrder
' * Module Filename : Taborder.dob
' * Procedure Name : cmdApply_Click
' * Parameters :
' **********************************************************************
' * Comments :
' *
' *
' **********************************************************************
On Error GoTo cmdApply_ClickErr
Dim i As Integer
Dim sTmp As String
Dim nCtlArrIndex As Integer
If InRunMode(VBInstance) Then Exit Sub
Screen.MousePointer = vbHourglass
For i = 0 To lstTabIndex.ListCount - 1
GetNameAndIndex lstTabIndex.List(i), sTmp, nCtlArrIndex
If nCtlArrIndex >= 0 Then
'set the new tab index
mcmpCurrentForm.Designer.VBControls.Item(sTmp, nCtlArrIndex).Properties!TabIndex = i
Else
'set the new tab index
mcmpCurrentForm.Designer.VBControls.Item(sTmp).Properties!TabIndex = i
End If
Next
Screen.MousePointer = vbDefault
Exit Sub
cmdApply_ClickErr:
' If MsgBoxTop(Me.hwnd, Err.Description & vbCrLf & "Resume?", vbYesNo) = vbYes Then
' Resume Next
' End If
Screen.MousePointer = vbDefault
End Sub
Private Sub cmdLeftToRight_Click()
' #VBIDEUtils#************************************************************
' * Programmer Name : removed
' * Web Site : http://www.ppreview.net
' * E-Mail : removed
' * Date : 28/10/1999
' * Time : 11:42
' * Module Name : docTabOrder
' * Module Filename : Taborder.dob
' * Procedure Name : cmdLeftToRight_Click
' * Parameters :
' **********************************************************************
' * Comments :
' *
' *
' **********************************************************************
RefreshList LEFTTORIGHT
End Sub
Private Sub cmdTopToBottom_Click()
' #VBIDEUtils#************************************************************
' * Programmer Name : removed
' * Web Site : http://www.ppreview.net
' * E-Mail : removed
' * Date : 28/10/1999
' * Time : 11:42
' * Module Name : docTabOrder
' * Module Filename : Taborder.dob
' * Procedure Name : cmdTopToBottom_Click
' * Parameters :
' **********************************************************************
' * Comments :
' *
' *
' **********************************************************************
RefreshList TOPTOBOTTOM
End Sub
Private Sub cmdRefresh_Click()
' #VBIDEUtils#************************************************************
' * Programmer Name : removed
' * Web Site : http://www.ppreview.net
' * E-Mail : removed
' * Date : 28/10/1999
' * Time : 11:42
' * Module Name : docTabOrder
' * Module Filename : Taborder.dob
' * Procedure Name : cmdRefresh_Click
' * Parameters :
' **********************************************************************
' * Comments :
' *
' *
' **********************************************************************
RefreshList REFRESHCTLS
End Sub
Private Sub Form_Load()
' #VBIDEUtils#************************************************************
' * Programmer Name : removed
' * Web Site : http://www.ppreview.net
' * E-Mail : removed
' * Date : 16/02/2000
' * Time : 14:58
' * Module Name : docTabOrder
' * Module Filename : Taborder.dob
' * Procedure Name : Form_Initialize
' * Parameters :
' **********************************************************************
' * Comments :
' *
' *
' **********************************************************************
On Error Resume Next
Call InitTooltips
Call cmdRefresh_Click
Call Form_Resize
End Sub
Private Sub Form_Show()
' #VBIDEUtils#************************************************************
' * Programmer Name : removed
' * Web Site : http://www.ppreview.net
' * E-Mail : removed
' * Date : 28/10/1999
' * Time : 11:42
' * Module Name : docTabOrder
' * Module Filename : Taborder.dob
' * Procedure Name : Form_Show
' * Parameters :
' **********************************************************************
' * Comments :
' *
' *
' **********************************************************************
'load the strings from the resource file
cmdUp.ToolTipText = "Move the current control up in the list."
cmdDown.ToolTipText = "Move the current control down in the list."
cmdTopToBottom.ToolTipText = "List controls in top to bottom order."
cmdLeftToRight.ToolTipText = "List controls in left to right order."
cmdRefresh.ToolTipText = "Refresh the list from the form."
cmdApply.ToolTipText = "Apply the changes to the form."
Call Form_Resize
End Sub
Private Sub Form_Resize()
' #VBIDEUtils#************************************************************
' * Programmer Name : removed
' * Web Site : http://www.ppreview.net
' * E-Mail : removed
' * Date : 28/10/1999
' * Time : 11:42
' * Module Name : docTabOrder
' * Module Filename : Taborder.dob
' * Procedure Name : Form_Resize
' * Parameters :
' **********************************************************************
' * Comments :
' *
' *
' **********************************************************************
lstTabIndex.Width = ScaleWidth - (lstTabIndex.left * 2)
lstTabIndex.Height = ScaleHeight - (cmdApply.Height + 100)
End Sub
Private Sub Form_Unload(Cancel As Integer)
On Error Resume Next
Set clsTooltips = Nothing
End Sub
Private Sub lstTabIndex_DragDrop(Source As Control, x As Single, y As Single)
' #VBIDEUtils#************************************************************
' * Programmer Name : removed
' * Web Site : http://www.ppreview.net
' * E-Mail : removed
' * Date : 28/10/1999
' * Time : 11:42
' * Module Name : docTabOrder
' * Module Filename : Taborder.dob
' * Procedure Name : lstTabIndex_DragDrop
' * Parameters :
' * Source As Control
' * x As Single
' * Y As Single
' **********************************************************************
' * Comments :
' * this sub moves the dragged item to a new location
' * based on the Y coordinate where it was dropped
' *
' **********************************************************************
Dim sTmp As String
Dim nListIndex As Integer
Dim nPos As Integer
Dim i As Integer
With lstTabIndex
nListIndex = .ListIndex
If Source = lstTabIndex Then
If nListIndex >= 0 Then
sTmp = .Text
nPos = (y \ TextHeight(sTmp)) + .TopIndex
'check for the last item
If nPos > .ListCount Then
nPos = .ListCount
End If
.AddItem sTmp, nPos
If nListIndex > nPos Then
.RemoveItem nListIndex + 1
Else
.RemoveItem nListIndex
End If
End If
End If
End With
End Sub
Sub lstTabIndex_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
' #VBIDEUtils#************************************************************
' * Programmer Name : removed
' * Web Site : http://www.ppreview.net
' * E-Mail : removed
' * Date : 28/10/1999
' * Time : 11:42
' * Module Name : docTabOrder
' * Module Filename : Taborder.dob
' * Procedure Name : lstTabIndex_MouseMove
' * Parameters :
' * button As Integer
' * Shift As Integer
' * x As Single
' * Y As Single
' **********************************************************************
' * Comments :
' *
' *
' **********************************************************************
If Button = vbLeftButton Then lstTabIndex.Drag
End Sub
Private Sub cmdUp_Click()
' #VBIDEUtils#************************************************************
' * Programmer Name : removed
' * Web Site : http://www.ppreview.net
' * E-Mail : removed
' * Date : 28/10/1999
' * Time : 11:42
' * Module Name : docTabOrder
' * Module Filename : Taborder.dob
' * Procedure Name : cmdUp_Click
' * Parameters :
' **********************************************************************
' * Comments :
' *
' *
' **********************************************************************
On Error Resume Next
Dim nItem As Integer
With lstTabIndex
If .ListIndex < 0 Then Exit Sub
nItem = .ListIndex
If nItem = 0 Then Exit Sub 'can't move 1st item up
'move item up
.AddItem .Text, nItem - 1
'remove old item
.RemoveItem nItem + 1
'select the item that was just moved
.Selected(nItem - 1) = True
End With
End Sub
Private Sub cmdDown_Click()
' #VBIDEUtils#************************************************************
' * Programmer Name : removed
' * Web Site : http://www.ppreview.net
' * E-Mail : removed
' * Date : 28/10/1999
' * Time : 11:42
' * Module Name : docTabOrder
' * Module Filename : Taborder.dob
' * Procedure Name : cmdDown_Click
' * Parameters :
' **********************************************************************
' * Comments :
' *
' *
' **********************************************************************
On Error Resume Next
Dim nItem As Integer
With lstTabIndex
If .ListIndex < 0 Then Exit Sub
nItem = .ListIndex
If nItem = .ListCount - 1 Then Exit Sub 'can't move last item down
'move item down
.AddItem .Text, nItem + 2
'remove old item
.RemoveItem nItem
'select the item that was just moved
.Selected(nItem + 1) = True
End With
End Sub
Function ControlName(Ctl As VBIDE.VBControl) As String
' #VBIDEUtils#************************************************************
' * Programmer Name : removed
' * Web Site : http://www.ppreview.net
' * E-Mail : removed
' * Date : 28/10/1999
' * Time : 11:42
' * Module Name : docTabOrder
' * Module Filename : Taborder.dob
' * Procedure Name : ControlName
' * Parameters :
' * ctl As VBIDE.VBControl
' **********************************************************************
' * Comments :
' *
' * this function returns a value to put in the listbox
' * for a control. It appends the Caption property
' * if it exists and is not null. It also appends
' * the control array index if the control is a
' * member of a control array
' *
' **********************************************************************
On Error Resume Next
Dim sTmp As String
Dim sCaption As String
Dim i As Integer
sTmp = Ctl.Properties!Name
sCaption = Ctl.Properties!Caption
'will be null if there isn't one
i = Ctl.Properties!index
If i >= 0 Then
sTmp = sTmp & "(" & i & ")"
End If
If Len(sCaption) > 0 Then
ControlName = sTmp & " - '" & sCaption & "'"
Else
ControlName = sTmp
End If
err.Clear
End Function
Public Sub RefreshList(nType As Integer)
' #VBIDEUtils#************************************************************
' * Programmer Name : removed
' * Web Site : http://www.ppreview.net
' * E-Mail : removed
' * Date : 28/10/1999
' * Time : 11:42
' * Module Name : docTabOrder
' * Module Filename : Taborder.dob
' * Procedure Name : RefreshList
' * Parameters :
' * nType As Integer
' **********************************************************************
' * Comments :
' *
' *
' **********************************************************************
On Error GoTo RefreshListErr
Dim i As Integer
Dim Ctl As VBControl
Dim sTmp As String
Dim ti As Integer
Dim sCtlName As String
Dim nCtlArrIndex As Integer
If InRunMode(VBInstance) Then Exit Sub
Dim cHourglass As class_Hourglass
Set cHourglass = New class_Hourglass
' *** Clear the list control
lstTabIndex.Clear
If VBInstance.ActiveVBProject Is Nothing Then Exit Sub
If nType = NEWFORM Then
If mcmpCurrentForm Is VBInstance.SelectedVBComponent Then
' *** Same one as we have now
Exit Sub
End If
End If
' *** Load the component
Set mcmpCurrentForm = VBInstance.SelectedVBComponent
' *** Check to see if we have a valid component
If mcmpCurrentForm Is Nothing Then Exit Sub
' *** Make sure the active component is a form, user control or property page
If (mcmpCurrentForm.Type <> vbext_ct_VBForm) And _
(mcmpCurrentForm.Type <> vbext_ct_UserControl) And _
(mcmpCurrentForm.Type <> vbext_ct_DocObject) And _
(mcmpCurrentForm.Type <> vbext_ct_PropPage) Then
Exit Sub
End If
Set mcolCtls = mcmpCurrentForm.Designer.VBControls
For Each Ctl In mcmpCurrentForm.Designer.VBControls
' *** Try to get the tabindex
On Error Resume Next
ti = Ctl.Properties!TabIndex
If err Then
' *** Doesn't have a tabindex
err.Clear
GoTo SkipIt
End If
On Error GoTo RefreshListErr
sTmp = ControlName(Ctl)
' *** Find out where it goes in the list
Select Case nType
Case NEWFORM, REFRESHCTLS
For i = 0 To lstTabIndex.ListCount - 1
If ti < lstTabIndex.ItemData(i) Then
Exit For
End If
Next
Case TOPTOBOTTOM
' *** Rearrange from top to bottom
For i = lstTabIndex.ListCount To 1 Step -1
GetNameAndIndex lstTabIndex.List(i - 1), sCtlName, nCtlArrIndex
If nCtlArrIndex >= 0 Then
' *** Control array member
If Ctl.Properties!top > mcolCtls(sCtlName, nCtlArrIndex).Properties!top Then
' *** It is above the current list item
Exit For
ElseIf Ctl.Properties!top = mcolCtls(sCtlName, nCtlArrIndex).Properties!top Then
' *** It is at the same top position so see if it is farther left
If Ctl.Properties!left > mcolCtls(sCtlName, nCtlArrIndex).Properties!left Then
Exit For
End If
End If
Else
If Ctl.Properties!top > mcolCtls(sCtlName).Properties!top Then
Exit For
ElseIf Ctl.Properties!top = mcolCtls(sCtlName).Properties!top Then
If Ctl.Properties!left > mcolCtls(sCtlName).Properties!left Then
Exit For
End If
End If
End If
Next
Case LEFTTORIGHT
' *** Rearrange from left to right
For i = lstTabIndex.ListCount To 1 Step -1
GetNameAndIndex lstTabIndex.List(i - 1), sCtlName, nCtlArrIndex
If nCtlArrIndex >= 0 Then
' *** Control array member
If Ctl.Properties!left > mcolCtls(sCtlName, nCtlArrIndex).Properties!left Then
Exit For
ElseIf Ctl.Properties!left = mcolCtls(sCtlName, nCtlArrIndex).Properties!left Then
If Ctl.Properties!top > mcolCtls(sCtlName, nCtlArrIndex).Properties!top Then
Exit For
End If
End If
Else
If Ctl.Properties!left > mcolCtls(sCtlName).Properties!left Then
Exit For
ElseIf Ctl.Properties!left = mcolCtls(sCtlName).Properties!left Then
If Ctl.Properties!top > mcolCtls(sCtlName).Properties!top Then
Exit For
End If
End If
End If
Next
End Select
' *** Add it to the list
lstTabIndex.AddItem sTmp, i
lstTabIndex.ItemData(lstTabIndex.NewIndex) = ti
lstTabIndex.Refresh
SkipIt:
Next
Exit Sub
RefreshListErr:
'MsgBox Err.Description
Exit Sub
End Sub
Public Sub ControlRemoved(Ctl As VBControl)
' #VBIDEUtils#************************************************************
' * Programmer Name : removed
' * Web Site : http://www.ppreview.net
' * E-Mail : removed
' * Date : 28/10/1999
' * Time : 11:42
' * Module Name : docTabOrder
' * Module Filename : Taborder.dob
' * Procedure Name : ControlRemoved
' * Parameters :
' * ctl As VBControl
' **********************************************************************
' * Comments :
' *
' *
' **********************************************************************
Dim sTmp As String
Dim i As Integer
sTmp = ControlName(Ctl)
For i = 0 To lstTabIndex.ListCount - 1
If lstTabIndex.List(i) = sTmp Then
'remove it from the list
lstTabIndex.RemoveItem i
Exit Sub
End If
Next
End Sub
Public Sub ControlAdded(Ctl As VBControl)
' #VBIDEUtils#************************************************************
' * Programmer Name : removed
' * Web Site : http://www.ppreview.net
' * E-Mail : removed
' * Date : 28/10/1999
' * Time : 11:42
' * Module Name : docTabOrder
' * Module Filename : Taborder.dob
' * Procedure Name : ControlAdded
' * Parameters :
' * ctl As VBControl
' **********************************************************************
' * Comments :
' *
' *
' **********************************************************************
Dim i As Integer
'try to get the tabindex
On Error Resume Next
i = Ctl.Properties!TabIndex
If err Then
err.Clear
'doesn't have a tabindex
Exit Sub
End If
lstTabIndex.AddItem ControlName(Ctl)
End Sub
Public Sub ControlRenamed(Ctl As VBControl, sOldName As String, lOldIndex As Long)
' #VBIDEUtils#************************************************************
' * Programmer Name : removed
' * Web Site : http://www.ppreview.net
' * E-Mail : removed
' * Date : 28/10/1999
' * Time : 11:42
' * Module Name : docTabOrder
' * Module Filename : Taborder.dob
' * Procedure Name : ControlRenamed
' * Parameters :
' * ctl As VBControl
' * sOldName As String
' * lOldIndex As Long
' **********************************************************************
' * Comments :
' *
' *
' **********************************************************************
On Error Resume Next
Dim sTmp As String
Dim i As Integer
If lOldIndex >= 0 Then
sOldName = sOldName & "(" & lOldIndex & ")"
End If
sTmp = ControlName(Ctl)
For i = 0 To lstTabIndex.ListCount - 1
If left$(lstTabIndex.List(i), Len(sOldName)) = sOldName Then
'remove it from the list
lstTabIndex.RemoveItem i
'add it back with the new name
lstTabIndex.AddItem sTmp, i
Exit Sub
End If
Next
err.Clear
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
' #VBIDEUtils#************************************************************
' * Programmer Name : removed
' * Web Site : http://www.ppreview.net
' * E-Mail : removed
' * Date : 28/10/1999
' * Time : 11:42
' * Module Name : docTabOrder
' * Module Filename : Taborder.dob
' * Procedure Name : Form_KeyDown
' * Parameters :
' * KeyCode As Integer
' * Shift As Integer
' **********************************************************************
' * Comments :
' *
' *
' **********************************************************************
' *** Pass the keystrokes onto the IDE
HandleKeyDown Me, KeyCode, Shift
End Sub
Sub GetNameAndIndex(sListItem As String, sName As String, nIndex As Integer)
' #VBIDEUtils#************************************************************
' * Programmer Name : removed
' * Web Site : http://www.ppreview.net
' * E-Mail : removed
' * Date : 28/10/1999
' * Time : 11:42
' * Module Name : docTabOrder
' * Module Filename : Taborder.dob
' * Procedure Name : GetNameAndIndex
' * Parameters :
' * sListItem As String
' * SName As String
' * nIndex As Integer
' **********************************************************************
' * Comments :
' *
' *
' **********************************************************************
Dim nPos As Integer
Dim nPos2 As Integer
Dim sTmp As String
' *** Strip off the caption if there is one
nPos = InStr(sListItem, " ")
If nPos > 0 Then
sTmp = left$(sListItem, nPos - 1)
Else
sTmp = sListItem
End If
' *** Now check for an index
nPos = InStr(sTmp, "(")
If nPos > 0 Then
' *** Control has an index so we need to
' *** Strip it off and save it
nPos2 = InStr(sTmp, ")")
nIndex = Val(Mid$(sTmp, nPos + 1, nPos2 - nPos))
sName = left$(sTmp, nPos - 1)
Else
nIndex = -1
sName = sTmp
End If
End Sub
Private Sub InitTooltips(Optional Flags As TooltipFlagConstants)
' #VBIDEUtils#************************************************************
' * Programmer Name : removed
' * Web Site : http://www.ppreview.net
' * E-Mail : removed
' * Date : 29/11/1999
' * Time : 11:15
' * Module Name : frmDependency
' * Module Filename : Dependency.frm
' * Procedure Name : InitTooltips
' * Parameters :
' * Optional Flags As TooltipFlagConstants
' **********************************************************************
' * Comments :
' *
' *
' **********************************************************************
Dim nI As Integer
On Error Resume Next
With clsTooltips
.CreateHwnd Me.hWnd, ttfBalloon
.MaxTipWidth = 70
.Icon = itInfoIcon
.Title = "VBIDEUtils"
For nI = 0 To Me.Controls.Count
If Trim$(Me.Controls(nI).ToolTipText) <> "" Then
If err = 0 Then
.AddToolHwnd Me.Controls(nI), Me.hWnd, tfTransparent, Me.Controls(nI).ToolTipText
Me.Controls(nI).ToolTipText = ""
Else
err.Clear
End If
End If
Next
End With
End Sub