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 EditTItem
3 BorderStyle = 3 'Fixed Dialog
4 ClientHeight = 2535
5 ClientLeft = 1890
6 ClientTop = 2145
7 ClientWidth = 5535
8 Height = 2940
9 Icon = "EditTItem.frx":0000
10 Left = 1830
11 LinkTopic = "Form1"
12 MaxButton = 0 'False
13 MinButton = 0 'False
14 ScaleHeight = 2535
15 ScaleWidth = 5535
16 ShowInTaskbar = 0 'False
17 Top = 1800
18 Width = 5655
19 Begin VB.CommandButton cmdBrowse
20 Caption = "&Browse..."
21 Height = 285
22 Left = 4560
23 TabIndex = 2
24 Top = 1680
25 Width = 855
26 End
27 Begin VB.CommandButton cmdCancel
28 Cancel = -1 'True
29 Caption = "&Cancel"
30 Height = 375
31 Left = 3120
32 TabIndex = 4
33 Top = 2040
34 Width = 1455
35 End
36 Begin VB.CommandButton cmdOK
37 Caption = "O&K"
38 Default = -1 'True
39 Height = 375
40 Left = 960
41 TabIndex = 3
42 Top = 2040
43 Width = 1455
44 End
45 Begin VB.TextBox txtCommand
46 Height = 285
47 Left = 120
48 TabIndex = 1
49 Top = 1680
50 Width = 4335
51 End
52 Begin VB.TextBox txtName
53 Height = 285
54 Left = 120
55 TabIndex = 0
56 Top = 480
57 Width = 5295
58 End
59 Begin VB.Label Label1
60 Caption = "Title: (Use a && before a letter to make it the key for the menu option. Use &&&& to display a &&.)"
61 Height = 390
62 Left = 120
63 TabIndex = 5
64 Top = 0
65 Width = 5295
66 WordWrap = -1 'True
67 End
68 Begin VB.Label Label2
69 Caption = $"EditTItem.frx":000C
70 Height = 870
71 Left = 120
72 TabIndex = 6
73 Top = 840
74 Width = 5295
75 WordWrap = -1 'True
76 End
77End
78Attribute VB_Name = "EditTItem"
79Attribute VB_Creatable = False
80Attribute VB_Exposed = False
81Option Explicit
82
83Dim ClickedOK As Boolean, Finished As Boolean
84Function EditItem(FormCaption As String, cName As String, cCommand As String) As String
85Left = ToolList.Left + 330
86If Left < 0 Then Left = 0
87If Left + Width > Screen.Width Then Left = Screen.Width - Width
88Top = ToolList.Top + 315
89If Top < 0 Then Top = 0
90If Top + Height > Screen.Height Then Top = Screen.Height - Height
91Caption = FormCaption
92txtName = cName
93txtCommand = cCommand
94Finished = False
95ClickedOK = False
96Show 1
97If ClickedOK = True Then
98 EditItem = txtName + vbCrLf + txtCommand
99Else
100 EditItem = cName + vbCrLf + cCommand
101End If
102Finished = True
103Unload Me
104End Function
105Private Sub cmdBrowse_Click()
106Dim OldFileName As String, OldPath As String
107CD.Flags = &H1000 Or &H4 Or &H2
108CD.Filter = "Programs (*.exe;*.com;*.bat)|*.exe;*.com;*.bat|All Files (*.*)|*.*"
109OldFileName = CD.FileName
110OldPath = CurDir
111If Mid(App.Path, 2, 1) = ":" Then
112 ChDrive Left(App.Path, 1)
113 ChDir Left(App.Path, 2) + "\"
114End If
115CD.FileName = ""
62046253 116CD.hwndOwner = hWnd
0d212c7b 117If ShowOpen(CD) = False Then GoTo Cancel
118txtCommand = Chr(34) + CD.FileName + Chr(34)
119Cancel:
120CD.FileName = OldFileName
121If Mid(OldPath, 2, 1) = ":" Then ChDrive Left(OldPath, 1)
122ChDir OldPath
123End Sub
124Private Sub cmdCancel_Click()
125Hide
126End Sub
127Private Sub cmdOK_Click()
128ClickedOK = True
129Hide
130End Sub
131Private Sub Form_Unload(Cancel As Integer)
132If Finished = False Then
133 Cancel = True
134 Hide
135End If
136End Sub