2 Begin VB.Form ModemSetup
4 BackColor = &H00C0C0C0&
5 BorderStyle = 3 'Fixed Dialog
12 name = "MS Sans Serif"
18 strikethrough = 0 'False
20 ForeColor = &H80000008&
31 Begin VB.CommandButton Cancel_Button
33 BackColor = &H80000005&
41 Begin VB.CommandButton Save_Button
43 BackColor = &H80000005&
51 Begin Threed.SSFrame Frame3D7
61 Caption = "Dial Command Prefix"
64 Begin VB.TextBox uDialPrefix
66 BackColor = &H00C0C0C0&
75 Begin Threed.SSFrame Frame3D6
85 Caption = "Modem Initialization String"
88 Begin VB.TextBox uInitString
90 BackColor = &H00C0C0C0&
99 Begin Threed.SSFrame Frame3D5
109 Caption = "Stop Bits"
112 Begin VB.OptionButton SB2
114 BackColor = &H00C0C0C0&
116 ForeColor = &H80000008&
123 Begin VB.OptionButton SB1
125 BackColor = &H00C0C0C0&
127 ForeColor = &H80000008&
135 Begin Threed.SSFrame Frame3D4
145 Caption = "Data Bits"
148 Begin VB.OptionButton DB7
150 BackColor = &H00C0C0C0&
152 ForeColor = &H80000008&
159 Begin VB.OptionButton DB8
161 BackColor = &H00C0C0C0&
163 ForeColor = &H80000008&
171 Begin Threed.SSFrame Frame3D3
184 Begin VB.OptionButton ParSpace
186 BackColor = &H00C0C0C0&
188 ForeColor = &H80000008&
195 Begin VB.OptionButton ParMark
197 BackColor = &H00C0C0C0&
199 ForeColor = &H80000008&
206 Begin VB.OptionButton ParOdd
208 BackColor = &H00C0C0C0&
210 ForeColor = &H80000008&
217 Begin VB.OptionButton ParEven
219 BackColor = &H00C0C0C0&
221 ForeColor = &H80000008&
228 Begin VB.OptionButton ParNone
230 BackColor = &H00C0C0C0&
232 ForeColor = &H80000008&
240 Begin Threed.SSFrame Frame3D2
253 Begin VB.ComboBox SpeedSel
255 BackColor = &H00C0C0C0&
263 Begin Threed.SSFrame Frame3D1
276 Begin VB.OptionButton Com5
278 BackColor = &H00C0C0C0&
280 ForeColor = &H80000008&
287 Begin VB.OptionButton Com4
289 BackColor = &H00C0C0C0&
291 ForeColor = &H80000008&
298 Begin VB.OptionButton Com3
300 BackColor = &H00C0C0C0&
302 ForeColor = &H80000008&
309 Begin VB.OptionButton Com2
311 BackColor = &H00C0C0C0&
313 ForeColor = &H80000008&
320 Begin VB.OptionButton Com1
322 BackColor = &H00C0C0C0&
324 ForeColor = &H80000008&
333 Attribute VB_Name = "ModemSetup"
334 Attribute VB_Creatable = False
335 Attribute VB_Exposed = False
337 Private Sub cancel_button_Click()
342 Private Sub Form_Load()
357 SpeedSel.Text = Str$(comspeed&)
358 SpeedSel.AddItem ("300")
359 SpeedSel.AddItem ("1200")
360 SpeedSel.AddItem ("2400")
361 SpeedSel.AddItem ("4800")
362 SpeedSel.AddItem ("9600")
363 SpeedSel.AddItem ("19200")
365 Select Case ComParity$
375 ParSpace.Value = True
378 Select Case comdatabits%
385 Select Case comstopbits%
392 uInitString.Text = cominitstring$
393 uDialPrefix.Text = comdialprefix$
397 Private Sub Form_Resize()
399 ModemSetup.Left = Abs(Int((MainWin.Width - ModemSetup.Width) / 2))
400 ModemSetup.Top = Abs(Int((MainWin.Height - ModemSetup.Height) / 3))
405 Private Sub save_button_Click()
407 If Com1.Value = True Then comport% = 1
408 If Com2.Value = True Then comport% = 2
409 If Com3.Value = True Then comport% = 3
410 If Com4.Value = True Then comport% = 4
411 If Com5.Value = True Then comport% = 5
413 comspeed& = CLng(SpeedSel.Text)
415 If ParNone.Value = True Then ComParity$ = "N"
416 If ParEven.Value = True Then ComParity$ = "E"
417 If ParOdd.Value = True Then ComParity$ = "O"
418 If ParMark.Value = True Then ComParity$ = "M"
419 If ParSpace.Value = True Then ComParity$ = "S"
421 If DB8.Value = True Then comdatabits% = 8
422 If DB7.Value = True Then comdatabits% = 7
424 If SB1.Value = True Then comstopbits% = 1
425 If SB2.Value = True Then comstopbits% = 2
427 cominitstring$ = uInitString.Text
428 comdialprefix$ = uDialPrefix.Text
430 a% = WritePrivateProfileString("Modem Setup", "ComPort", Str$(comport%), "WINCIT.INI")
431 a% = WritePrivateProfileString("Modem Setup", "Speed", CStr(comspeed&), "WINCIT.INI")
432 a% = WritePrivateProfileString("Modem Setup", "Parity", ComParity$, "WINCIT.INI")
433 a% = WritePrivateProfileString("Modem Setup", "DataBits", Str$(comdatabits%), "WINCIT.INI")
434 a% = WritePrivateProfileString("Modem Setup", "StopBits", Str$(comstopbits%), "WINCIT.INI")
435 a% = WritePrivateProfileString("Modem Setup", "InitString", cominitstring$, "WINCIT.INI")
436 a% = WritePrivateProfileString("Modem Setup", "DialPrefix", comdialprefix$, "WINCIT.INI")