home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Eagles Nest BBS 6
/
Eagles_Nest_Mac_Collection_Disc_6.TOAST
/
Windows
/
VisBasAPIex
/
VBAPIGUIDE.image
/
COMMCFG.FRM
< prev
next >
Wrap
Text File
|
1992-10-11
|
3KB
|
88 lines
VERSION 2.00
Begin Form Commcfg
Caption = "CommDemo Configuration"
Height = 2145
Left = 1455
LinkMode = 1 'Source
LinkTopic = "Form1"
ScaleHeight = 1740
ScaleWidth = 4905
Top = 1575
Width = 5025
Begin CommandButton CmdOk
Caption = "Ok"
Height = 495
Left = 3960
TabIndex = 6
Top = 360
Width = 735
End
Begin Frame Frame2
Caption = "Speed"
Height = 1095
Left = 2040
TabIndex = 3
Top = 240
Width = 1695
Begin OptionButton Option1200
Caption = "1200 Baud"
Height = 255
Left = 120
TabIndex = 5
Top = 720
Width = 1215
End
Begin OptionButton Option2400
Caption = "2400 Baud"
Height = 255
Left = 120
TabIndex = 4
Top = 360
Value = -1 'True
Width = 1455
End
End
Begin Frame Frame1
Caption = "Device"
Height = 1095
Left = 240
TabIndex = 0
Top = 240
Width = 1335
Begin OptionButton OptionCom2
Caption = "COM2"
Height = 255
Left = 120
TabIndex = 2
Top = 720
Width = 975
End
Begin OptionButton OptionCom1
Caption = "COM1"
Height = 255
Left = 120
TabIndex = 1
Top = 360
Value = -1 'True
Width = 975
End
End
End
' The port to use and configuration may have changed
'
Sub CmdOk_Click ()
Dim baudtouse%
OpenThePort
' Now make any configuration changes
If Option1200.Value = True Then baudtouse% = 1200 Else baudtouse% = 2400
If PortConfig.BaudRate <> baudtouse% Then
PortConfig.BaudRate = baudtouse%
If (CommID% >= 0) Then di% = SetCommState(PortConfig)
End If
Commcfg.Hide
End Sub