home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Form1
- BackColor = &H00C0C0C0&
- BorderStyle = 1 'Fixed Single
- Caption = "Communcations Example"
- ClientHeight = 2655
- ClientLeft = 1095
- ClientTop = 1485
- ClientWidth = 4215
- ControlBox = 0 'False
- Height = 3180
- Left = 1035
- LinkMode = 1 'Source
- LinkTopic = "Form1"
- MaxButton = 0 'False
- ScaleHeight = 2655
- ScaleWidth = 4215
- Top = 1020
- Width = 4335
- Begin Label3D Label3D2
- AlignHor = 0 'Left
- AlignVert = 0 'Top
- BackColor = &H00C0C0C0&
- Border = -1 'True
- BorderWidth = 1
- Caption = "Output:"
- Height = 137
- Left = 0
- Raised = -1 'True
- TextShadow = 0 'False
- TextShadowCol = &H00000000&
- Top = 600
- WaveEnabled = 0 'False
- WaveFile = ""
- WaveLoop = 0 'False
- WaveStyle = 0 'Synchronous
- Width = 281
- Begin PictureBox Picture1
- BackColor = &H00FFFF00&
- Height = 1695
- Left = 60
- ScaleHeight = 1665
- ScaleWidth = 4065
- TabIndex = 4
- Top = 300
- Width = 4095
- End
- End
- Begin Comm Comm1
- Baud = 2 '2400
- Left = 60
- Top = 60
- End
- Begin Label3D Label3D1
- AlignHor = 0 'Left
- AlignVert = 0 'Top
- BackColor = &H00C0C0C0&
- Border = -1 'True
- BorderWidth = 1
- Height = 41
- Left = 0
- Raised = -1 'True
- TextShadow = 0 'False
- TextShadowCol = &H00000000&
- Top = 0
- WaveEnabled = 0 'False
- WaveFile = ""
- WaveLoop = 0 'False
- WaveStyle = 0 'Synchronous
- Width = 281
- Begin CommandButton Command4
- Caption = "E&xit"
- Height = 495
- Left = 3120
- TabIndex = 3
- Top = 60
- Width = 1035
- End
- Begin CommandButton Command2
- Caption = "&Quit"
- Enabled = 0 'False
- Height = 495
- Left = 2100
- TabIndex = 1
- Top = 60
- Width = 975
- End
- Begin CommandButton Command1
- Caption = "&Begin"
- Enabled = 0 'False
- Height = 495
- Left = 1080
- TabIndex = 0
- Top = 60
- Width = 975
- End
- Begin CommandButton Command3
- Caption = "&Initialize"
- Height = 495
- Left = 60
- TabIndex = 2
- Top = 60
- Width = 975
- End
- End
- Sub Comm1_InQueue (Queued As Integer)
- s$ = Comm1.DataStr ' Put characters in a string
- Picture1.Print s$; ' Print the string to picture
- End Sub
- Sub Command1_Click ()
- If Comm1.Enable = 0 Then ' If not enabled...
- Command3.Enabled = 1 ' Enable Initialize and
- Command4.Enabled = 1 ' Exit buttons and exit
- Command1.Enabled = 0
- Exit Sub
- End If
- Command1.Enabled = 0 ' Enable Quit button
- Command2.Enabled = 1
- Comm1.DataStr = "ATZ" + Chr$(10) + Chr$(13) ' Send ATZ to modem
- Form3.Show ' Display input form
- End Sub
- Sub Command2_Click ()
- Form3.Hide ' Kill input form
- Comm1.Enable = 0 ' Disable port
- Command2.Enabled = 0
- Command1.Enabled = 0 ' Enable Initialize and
- Command3.Enabled = 1 ' Exit buttons
- Command4.Enabled = 1
- End Sub
- Sub Command3_Click ()
- Form2.Show 1 ' Display Setup Form
- If Comm1.Enable = 0 Then Exit Sub ' If not enabled, exit
- Command1.Enabled = 1 ' Enable Begin button
- Command3.Enabled = 0 ' Disable the rest
- Command2.Enabled = 0
- Command4.Enabled = 0
- Picture1.Cls ' Clear the picture
- End Sub
- Sub Command4_Click ()
- End Sub
- Sub Form_Click ()
- If Comm1.Enable <> 0 Then
- Comm1.DataStr = "ATZ" + Chr$(10) + Chr$(13)
- End If
- End Sub
-