Current News
Archived News
Search News
Discussion Forum


Old Forum
Install Programs More Downloads...
Troubleshooting
Source Code
Format Specs.
Misc. Information
Non-SF Stuff
Links




CommitLineData
0d212c7b 1VERSION 4.00
2Begin VB.Form ToolList
3 BorderStyle = 3 'Fixed Dialog
4 Caption = "Add/Remove Tools"
5 ClientHeight = 2775
6 ClientLeft = 1575
7 ClientTop = 1815
8 ClientWidth = 4065
9 Height = 3180
10 Icon = "ToolList.frx":0000
11 Left = 1515
12 LinkTopic = "Form1"
13 MaxButton = 0 'False
14 MinButton = 0 'False
15 ScaleHeight = 2775
16 ScaleWidth = 4065
17 ShowInTaskbar = 0 'False
18 Top = 1470
19 Width = 4185
20 Begin VB.CommandButton Command2
21 Cancel = -1 'True
22 Caption = "&Cancel"
23 Height = 375
24 Left = 1920
25 TabIndex = 3
26 Top = 2400
27 Width = 1455
28 End
29 Begin VB.CommandButton cmdOK
30 Caption = "O&K"
31 Default = -1 'True
32 Height = 375
33 Left = 240
34 TabIndex = 2
35 Top = 2400
36 Width = 1455
37 End
38 Begin VB.ListBox tList
39 Height = 2370
40 IntegralHeight = 0 'False
41 Left = 0
42 TabIndex = 1
43 Top = 0
44 Width = 3600
45 End
46 Begin MSComctlLib.Toolbar Toolbar1
47 Height = 450
48 Left = 3600
49 TabIndex = 0
50 Top = 0
51 Width = 495
52 _ExtentX = 873
53 _ExtentY = 794
54 ButtonWidth = 820
55 ButtonHeight = 794
56 AllowCustomize = 0 'False
57 Style = 1
58 ImageList = "ImageList1"
59 DisabledImageList= "ImageList2"
60 HotImageList = "ImageList3"
61 _Version = 393216
62 BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
63 NumButtons = 6
64 BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
65 Key = "Add"
66 ToolTipText = "Add a program to the list."
67 ImageIndex = 1
68 EndProperty
69 BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
70 Enabled = 0 'False
71 Key = "Remove"
72 ToolTipText = "Remove selected program from the list."
73 ImageIndex = 2
74 EndProperty
75 BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
76 Enabled = 0 'False
77 Key = "Edit"
78 ToolTipText = "Edit properties for selected program."
79 ImageIndex = 3
80 EndProperty
81 BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
82 Style = 3
83 EndProperty
84 BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
85 Enabled = 0 'False
86 Key = "Up"
87 ToolTipText = "Move selected program up in the list."
88 ImageIndex = 4
89 EndProperty
90 BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
91 Enabled = 0 'False
92 Key = "Down"
93 ToolTipText = "Move selected program down in the list."
94 ImageIndex = 5
95 EndProperty
96 EndProperty
97 End
98 Begin MSComctlLib.ImageList ImageList3
99 Left = 3360
100 Top = 2400
101 _ExtentX = 1005
102 _ExtentY = 1005
103 BackColor = -2147483643
104 ImageWidth = 24
105 ImageHeight = 24
106 MaskColor = 12632256
107 _Version = 393216
108 BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
109 NumListImages = 5
110 BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
111 Picture = "ToolList.frx":000C
112 Key = ""
113 EndProperty
114 BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
115 Picture = "ToolList.frx":00D8
116 Key = ""
117 EndProperty
118 BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
119 Picture = "ToolList.frx":0188
120 Key = ""
121 EndProperty
122 BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
123 Picture = "ToolList.frx":0238
124 Key = ""
125 EndProperty
126 BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
127 Picture = "ToolList.frx":0310
128 Key = ""
129 EndProperty
130 EndProperty
131 End
132 Begin MSComctlLib.ImageList ImageList2
133 Left = 1560
134 Top = 2400
135 _ExtentX = 1005
136 _ExtentY = 1005
137 BackColor = -2147483643
138 ImageWidth = 24
139 ImageHeight = 24
140 MaskColor = 12632256
141 _Version = 393216
142 BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
143 NumListImages = 5
144 BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
145 Picture = "ToolList.frx":03E8
146 Key = ""
147 EndProperty
148 BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
149 Picture = "ToolList.frx":04C4
150 Key = ""
151 EndProperty
152 BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
153 Picture = "ToolList.frx":0574
154 Key = ""
155 EndProperty
156 BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
157 Picture = "ToolList.frx":0654
158 Key = ""
159 EndProperty
160 BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
161 Picture = "ToolList.frx":0734
162 Key = ""
163 EndProperty
164 EndProperty
165 End
166 Begin MSComctlLib.ImageList ImageList1
167 Left = 0
168 Top = 2280
169 _ExtentX = 1005
170 _ExtentY = 1005
171 BackColor = -2147483643
172 ImageWidth = 24
173 ImageHeight = 24
174 MaskColor = 12632256
175 _Version = 393216
176 BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
177 NumListImages = 5
178 BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
179 Picture = "ToolList.frx":0810
180 Key = ""
181 EndProperty
182 BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
183 Picture = "ToolList.frx":08EC
184 Key = ""
185 EndProperty
186 BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
187 Picture = "ToolList.frx":09A8
188 Key = ""
189 EndProperty
190 BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
191 Picture = "ToolList.frx":0A6C
192 Key = ""
193 EndProperty
194 BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
195 Picture = "ToolList.frx":0B4C
196 Key = ""
197 EndProperty
198 EndProperty
199 End
200End
201Attribute VB_Name = "ToolList"
202Attribute VB_Creatable = False
203Attribute VB_Exposed = False
204Option Explicit
205
206Dim tCommands() As String
207Private Sub cmdOK_Click()
208Dim tNum As Long
209DelKey AppKey + "Tools\"
210NewKey AppKey + "Tools\"
211For tNum = 0 To tList.ListCount - 1
212 SetReg AppKey + "Tools\Name" + CStr(tNum), tList.List(tNum)
213 SetReg AppKey + "Tools\Command" + CStr(tNum), tCommands(tNum + 1)
214Next tNum
215Unload Me
216End Sub
217Private Sub Command2_Click()
218Unload Me
219End Sub
220Private Sub Form_Load()
221Dim tNum As Long, ToolName As String, ToolCommand
222Left = MpqEx.Left + 330
223If Left < 0 Then Left = 0
224If Left + Width > Screen.Width Then Left = Screen.Width - Width
225Top = MpqEx.Top + 315
226If Top < 0 Then Top = 0
227If Top + Height > Screen.Height Then Top = Screen.Height - Height
228ReDim tCommands(0) As String
229Do
230 ToolName = GetReg(AppKey + "Tools\Name" + CStr(tNum))
231 ToolCommand = GetReg(AppKey + "Tools\Command" + CStr(tNum))
232 If ToolName = "" Then ToolName = ToolCommand
233 If ToolName <> "" Then
234 ReDim Preserve tCommands(UBound(tCommands) + 1) As String
235 tCommands(UBound(tCommands)) = ToolCommand
236 tList.AddItem ToolName
237 End If
238 tNum = tNum + 1
239Loop Until ToolName = ""
240End Sub
241Private Sub tList_Click()
242If tList.ListIndex > -1 Then
243 Toolbar1.Buttons.Item("Remove").Enabled = True
244 Toolbar1.Buttons.Item("Edit").Enabled = True
245Else
246 Toolbar1.Buttons.Item("Remove").Enabled = False
247 Toolbar1.Buttons.Item("Edit").Enabled = False
248End If
249If tList.ListIndex > 0 Then
250 Toolbar1.Buttons.Item("Up").Enabled = True
251Else
252 Toolbar1.Buttons.Item("Up").Enabled = False
253End If
254If tList.ListIndex < tList.ListCount - 1 And tList.ListIndex > -1 Then
255 Toolbar1.Buttons.Item("Down").Enabled = True
256Else
257 Toolbar1.Buttons.Item("Down").Enabled = False
258End If
259End Sub
260Private Sub Toolbar1_ButtonClick(ByVal Button As Button)
261Dim TempText As String, tNum As Long
262Select Case Button.Key
263Case "Add"
264 TempText = EditTItem.EditItem("Add Command", "", "")
265 If TempText <> vbCrLf Then
266 tList.AddItem Left(TempText, InStr(TempText, vbCrLf) - 1)
267 ReDim Preserve tCommands(UBound(tCommands) + 1) As String
268 tCommands(UBound(tCommands)) = Mid(TempText, InStr(TempText, vbCrLf) + 2)
269 tList.ListIndex = tList.ListCount - 1
270 End If
271Case "Remove"
272 For tNum = tList.ListIndex + 1 To tList.ListCount - 1
273 tCommands(tNum) = tCommands(tNum + 1)
274 Next tNum
275 ReDim Preserve tCommands(UBound(tCommands) - 1) As String
276 tList.RemoveItem tList.ListIndex
277 tList_Click
278Case "Edit"
279 TempText = EditTItem.EditItem("Edit Command", tList.List(tList.ListIndex), tCommands(tList.ListIndex + 1))
280 tList.List(tList.ListIndex) = Left(TempText, InStr(TempText, vbCrLf) - 1)
281 tCommands(tList.ListIndex + 1) = Mid(TempText, InStr(TempText, vbCrLf) + 2)
282Case "Up"
283 TempText = tList.List(tList.ListIndex)
284 tList.List(tList.ListIndex) = tList.List(tList.ListIndex - 1)
285 tList.List(tList.ListIndex - 1) = TempText
286 TempText = tCommands(tList.ListIndex + 1)
287 tCommands(tList.ListIndex + 1) = tCommands(tList.ListIndex)
288 tCommands(tList.ListIndex) = TempText
289 tList.ListIndex = tList.ListIndex - 1
290Case "Down"
291 TempText = tList.List(tList.ListIndex)
292 tList.List(tList.ListIndex) = tList.List(tList.ListIndex + 1)
293 tList.List(tList.ListIndex + 1) = TempText
294 TempText = tCommands(tList.ListIndex + 1)
295 tCommands(tList.ListIndex + 1) = tCommands(tList.ListIndex + 2)
296 tCommands(tList.ListIndex + 2) = TempText
297 tList.ListIndex = tList.ListIndex + 1
298End Select
299End Sub