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