2 Begin VB.Form SelectBBS
4 BackColor = &H00C0C0C0&
5 BorderStyle = 3 'Fixed Dialog
11 FillColor = &H00C0C0C0&
13 name = "MS Sans Serif"
19 strikethrough = 0 'False
21 ForeColor = &H80000008&
32 Begin VB.CommandButton Prefs_button
34 BackColor = &H80000005&
35 Caption = "Preferences..."
42 Begin VB.CommandButton Call_button
44 BackColor = &H80000005&
52 Begin VB.CommandButton Delete_Button
54 BackColor = &H80000005&
62 Begin VB.CommandButton Edit_Button
64 BackColor = &H80000005&
72 Begin VB.CommandButton New_Button
74 BackColor = &H80000005&
82 Begin VB.ListBox List1
91 strikethrough = 0 'False
100 Attribute VB_Name = "SelectBBS"
101 Attribute VB_Creatable = False
102 Attribute VB_Exposed = False
103 Dim myDirectory(30) As BBSdir
106 Private Sub call_button_click()
108 If List1.ListIndex >= 0 Then
110 CurrBBS = myDirectory(List1.ListIndex)
120 Private Sub Delete_Button_Click()
122 If List1.ListIndex >= 0 Then
123 If (MsgBox("Are you sure you wish to delete this system from your list?", 4 + 48 + 256) = 6) Then
124 For a% = List1.ListIndex To maxEntries% - 1
125 myDirectory(a%) = myDirectory(a% + 1)
128 maxEntries% = maxEntries% - 1
132 Call SaveDialingDirectory
133 Call display_directory
138 Private Sub display_directory()
140 If maxEntries > 0 Then
141 For a% = 0 To maxEntries - 1
142 List1.AddItem (myDirectory(a%).Name)
148 Private Sub edit_button_click()
149 If List1.ListIndex >= 0 Then
150 CurrBBS = myDirectory(List1.ListIndex)
151 editedBBSnum = List1.ListIndex
158 Private Sub Form_Load()
161 MainWin.Caption = "Citadel/UX Client for Windows"
164 SelectBBS.Width = Int(MainWin.Width * 0.9)
165 SelectBBS.Height = Int(MainWin.Height * 0.7)
166 SelectBBS.Left = Int((MainWin.Width - SelectBBS.Width) / 2)
167 SelectBBS.Top = Int((MainWin.Height - SelectBBS.Height) / 4)
170 ' Initialize the dialing directory
173 Call LoadDialingDirectory
177 Private Sub Form_Resize()
179 new_button.Top = Abs(SelectBBS.Height - 996)
180 edit_button.Top = Abs(SelectBBS.Height - 996)
181 delete_button.Top = Abs(SelectBBS.Height - 996)
182 call_button.Top = Abs(SelectBBS.Height - 996)
183 prefs_button.Top = Abs(SelectBBS.Height - 996)
184 List1.Height = Abs(SelectBBS.Height - 1212 - List1.Top + 120)
185 List1.Width = Abs(SelectBBS.Width - 288)
189 Private Sub List1_DblClick()
190 Call call_button_click
193 Private Sub List1_KeyPress(keyascii As Integer)
194 If keyascii = 13 Then Call call_button_click
197 Private Sub LoadDialingDirectory()
199 Open "dialing.dir" For Input As #1
204 Input #1, myDirectory(a%).Name, myDirectory(a%).PhoneOrAddress, myDirectory(a%).TCPport
205 If Err = 0 Then maxEntries = maxEntries + 1
212 If editedBBSnum >= 0 Then
213 myDirectory(editedBBSnum) = CurrBBS
218 If maxEntries% > 0 Then
219 For a% = 0 To maxEntries - 1
220 If Left$(myDirectory(a%).Name, 9) = "newbbs000" Then
221 myDirectory(a%) = myDirectory(a% + 1)
222 maxEntries% = maxEntries% - 1
227 If b% = 1 Then Call SaveDialingDirectory
228 Call display_directory
232 Private Sub New_Button_Click()
234 maxEntries% = maxEntries% + 1
238 myDirectory(z).Name = "newbbs000"
239 myDirectory(z).PhoneOrAddress = ""
240 myDirectory(z).TCPport = 504
242 Call SaveDialingDirectory
243 Call display_directory
246 Call edit_button_click
249 Private Sub Prefs_button_Click()
254 Private Sub SaveDialingDirectory()
256 Open "dialing.dir" For Output As #1
258 If maxEntries > 0 Then
259 For a% = 0 To maxEntries - 1
260 Write #1, myDirectory(a%).Name, myDirectory(a%).PhoneOrAddress, myDirectory(a%).TCPport