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 Small banner for links to this site: |
7df3812b038f4c505ad1aadbb6673dcdaef0deae
1 VERSION 4.00
2 Begin 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
77 End
78 Attribute VB_Name = "EditTItem"
79 Attribute VB_Creatable = False
80 Attribute VB_Exposed = False
81 Option Explicit
83 Dim ClickedOK As Boolean, Finished As Boolean
84 Function EditItem(FormCaption As String, cName As String, cCommand As String) As String
85 Left = ToolList.Left + 330
86 If Left < 0 Then Left = 0
87 If Left + Width > Screen.Width Then Left = Screen.Width - Width
88 Top = ToolList.Top + 315
89 If Top < 0 Then Top = 0
90 If Top + Height > Screen.Height Then Top = Screen.Height - Height
91 Caption = FormCaption
92 txtName = cName
93 txtCommand = cCommand
94 Finished = False
95 ClickedOK = False
96 Show 1
97 If ClickedOK = True Then
98 EditItem = txtName + vbCrLf + txtCommand
99 Else
100 EditItem = cName + vbCrLf + cCommand
101 End If
102 Finished = True
103 Unload Me
104 End Function
105 Private Sub cmdBrowse_Click()
106 Dim OldFileName As String, OldPath As String
107 CD.Flags = &H1000 Or &H4 Or &H2
108 CD.Filter = "Programs (*.exe;*.com;*.bat)|*.exe;*.com;*.bat|All Files (*.*)|*.*"
109 OldFileName = CD.FileName
110 OldPath = CurDir
111 If Mid(App.Path, 2, 1) = ":" Then
112 ChDrive Left(App.Path, 1)
113 ChDir Left(App.Path, 2) + "\"
114 End If
115 CD.FileName = ""
116 If ShowOpen(CD) = False Then GoTo Cancel
117 txtCommand = Chr(34) + CD.FileName + Chr(34)
118 Cancel:
119 CD.FileName = OldFileName
120 If Mid(OldPath, 2, 1) = ":" Then ChDrive Left(OldPath, 1)
121 ChDir OldPath
122 End Sub
123 Private Sub cmdCancel_Click()
124 Hide
125 End Sub
126 Private Sub cmdOK_Click()
127 ClickedOK = True
128 Hide
129 End Sub
130 Private Sub Form_Unload(Cancel As Integer)
131 If Finished = False Then
132 Cancel = True
133 Hide
134 End If
135 End Sub
|