blob: e526a35b3ecb6f34d2c590865946e224d9044ef7 (
plain)
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
|
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.Form frmOptions
BorderStyle = 3 'Fixed Dialog
Caption = "Options"
ClientHeight = 5040
ClientLeft = 6600
ClientTop = 4575
ClientWidth = 6150
KeyPreview = -1 'True
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5040
ScaleWidth = 6150
ShowInTaskbar = 0 'False
Tag = "Options"
Begin VB.CommandButton cmdOK
Caption = "OK"
Height = 375
Left = 2490
TabIndex = 1
Tag = "OK"
Top = 4455
Width = 1095
End
Begin VB.CommandButton cmdCancel
Cancel = -1 'True
Caption = "Cancel"
Height = 375
Left = 3720
TabIndex = 3
Tag = "Cancel"
Top = 4455
Width = 1095
End
Begin VB.CommandButton cmdApply
Caption = "&Apply"
Height = 375
Left = 4920
TabIndex = 5
Tag = "&Apply"
Top = 4455
Width = 1095
End
Begin VB.PictureBox picOptions
BorderStyle = 0 'None
Height = 3780
Index = 3
Left = -20000
ScaleHeight = 3840.968
ScaleMode = 0 'User
ScaleWidth = 5745.64
TabIndex = 7
TabStop = 0 'False
Top = 480
Width = 5685
Begin VB.Frame fraSample4
Caption = "Sample 4"
Height = 2022
Left = 505
TabIndex = 11
Tag = "Sample 4"
Top = 502
Width = 2033
End
End
Begin VB.PictureBox picOptions
BorderStyle = 0 'None
Height = 3780
Index = 2
Left = -20000
ScaleHeight = 3840.968
ScaleMode = 0 'User
ScaleWidth = 5745.64
TabIndex = 9
TabStop = 0 'False
Top = 480
Width = 5685
Begin VB.Frame fraSample3
Caption = "Sample 3"
Height = 2022
Left = 406
TabIndex = 10
Tag = "Sample 3"
Top = 403
Width = 2033
End
End
Begin VB.PictureBox picOptions
BorderStyle = 0 'None
Height = 3780
Index = 1
Left = -20000
ScaleHeight = 3840.968
ScaleMode = 0 'User
ScaleWidth = 5745.64
TabIndex = 6
TabStop = 0 'False
Top = 480
Width = 5685
Begin VB.Frame fraSample2
Caption = "Sample 2"
Height = 2022
Left = 307
TabIndex = 8
Tag = "Sample 2"
Top = 305
Width = 2033
End
End
Begin VB.PictureBox picOptions
BorderStyle = 0 'None
Height = 3780
Index = 0
Left = 210
ScaleHeight = 3840.968
ScaleMode = 0 'User
ScaleWidth = 5745.64
TabIndex = 2
TabStop = 0 'False
Top = 480
Width = 5685
Begin VB.Frame fraSample1
Caption = "Sample 1"
Height = 2022
Left = 208
TabIndex = 4
Tag = "Sample 1"
Top = 207
Width = 2033
End
End
Begin MSComctlLib.TabStrip tbsOptions
Height = 4245
Left = 105
TabIndex = 0
Top = 120
Width = 5895
_ExtentX = 10398
_ExtentY = 7488
_Version = 393216
BeginProperty Tabs {1EFB6598-857C-11D1-B16A-00C0F0283628}
NumTabs = 4
BeginProperty Tab1 {1EFB659A-857C-11D1-B16A-00C0F0283628}
Caption = "Group 1"
ImageVarType = 2
EndProperty
BeginProperty Tab2 {1EFB659A-857C-11D1-B16A-00C0F0283628}
Caption = "Group 2"
ImageVarType = 2
EndProperty
BeginProperty Tab3 {1EFB659A-857C-11D1-B16A-00C0F0283628}
Caption = "Group 3"
ImageVarType = 2
EndProperty
BeginProperty Tab4 {1EFB659A-857C-11D1-B16A-00C0F0283628}
Caption = "Group 4"
ImageVarType = 2
EndProperty
EndProperty
End
End
Attribute VB_Name = "frmOptions"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdApply_Click()
'ToDo: Add 'cmdApply_Click' code.
MsgBox "Apply Code goes here to set options w/o closing dialog!"
End Sub
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdOK_Click()
'ToDo: Add 'cmdOK_Click' code.
MsgBox "Code goes here to set options and close dialog!"
Unload Me
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Dim i As Integer
i = tbsOptions.SelectedItem.Index
'handle ctrl+tab to move to the next tab
If (Shift And 3) = 2 And KeyCode = vbKeyTab Then
If i = tbsOptions.Tabs.Count Then
'last tab so we need to wrap to tab 1
Set tbsOptions.SelectedItem = tbsOptions.Tabs(1)
Else
'increment the tab
Set tbsOptions.SelectedItem = tbsOptions.Tabs(i + 1)
End If
ElseIf (Shift And 3) = 3 And KeyCode = vbKeyTab Then
If i = 1 Then
'last tab so we need to wrap to tab 1
Set tbsOptions.SelectedItem = tbsOptions.Tabs(tbsOptions.Tabs.Count)
Else
'increment the tab
Set tbsOptions.SelectedItem = tbsOptions.Tabs(i - 1)
End If
End If
End Sub
Private Sub tbsOptions_Click()
Dim i As Integer
'show and enable the selected tab's controls
'and hide and disable all others
For i = 0 To tbsOptions.Tabs.Count - 1
If i = tbsOptions.SelectedItem.Index - 1 Then
picOptions(i).Left = 210
picOptions(i).Enabled = True
Else
picOptions(i).Left = -20000
picOptions(i).Enabled = False
End If
Next
End Sub
|