home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form frmcomm
- Caption = "Form1"
- ClientHeight = 4140
- ClientLeft = 1905
- ClientTop = 1920
- ClientWidth = 5685
- Height = 4545
- Left = 1845
- LinkTopic = "Form1"
- ScaleHeight = 4140
- ScaleWidth = 5685
- Top = 1575
- Width = 5805
- Begin VB.CommandButton cmdHangUp
- Caption = "&Hang Up"
- Height = 395
- Left = 4380
- TabIndex = 13
- Top = 3480
- Width = 1215
- End
- Begin VB.ComboBox comParity
- Height = 315
- Left = 3000
- Style = 2 'Dropdown List
- TabIndex = 12
- Top = 2880
- Width = 1755
- End
- Begin VB.ComboBox comStopBits
- Height = 315
- Left = 3000
- Style = 2 'Dropdown List
- TabIndex = 11
- Top = 2400
- Width = 1755
- End
- Begin VB.ComboBox comDataBits
- Height = 315
- Left = 3000
- Style = 2 'Dropdown List
- TabIndex = 10
- Top = 1920
- Width = 1755
- End
- Begin VB.ComboBox comLineSpeed
- Height = 315
- Left = 3000
- Style = 2 'Dropdown List
- TabIndex = 6
- Top = 1440
- Width = 1755
- End
- Begin VB.ComboBox comCommPort
- Height = 315
- Left = 3000
- Style = 2 'Dropdown List
- TabIndex = 4
- Top = 960
- Width = 1755
- End
- Begin VB.CommandButton cmdDial
- Caption = "&Dial"
- Height = 395
- Left = 2940
- TabIndex = 2
- Top = 3480
- Width = 1215
- End
- Begin VB.TextBox txtNumber
- Height = 300
- Left = 3000
- TabIndex = 1
- Top = 480
- Width = 2355
- End
- Begin VB.Label lblParity
- Caption = "Parity"
- Height = 300
- Left = 420
- TabIndex = 9
- Top = 2880
- Width = 2175
- End
- Begin VB.Label lblStopBits
- Caption = "Stop Bits"
- Height = 300
- Left = 420
- TabIndex = 8
- Top = 2400
- Width = 2175
- End
- Begin VB.Label lblDataBits
- Caption = "Data Bits"
- Height = 300
- Left = 420
- TabIndex = 7
- Top = 1920
- Width = 2175
- End
- Begin VB.Label lbl_lineSpeed
- Caption = "Line Speed"
- Height = 300
- Left = 420
- TabIndex = 5
- Top = 1440
- Width = 2175
- End
- Begin VB.Label lblCommPort
- Caption = "Communication Port"
- Height = 300
- Left = 420
- TabIndex = 3
- Top = 960
- Width = 2175
- End
- Begin VB.Label lblNumber
- Caption = "Number To Dial"
- Height = 295
- Left = 420
- TabIndex = 0
- Top = 480
- Width = 2175
- End
- Begin MSCommLib.MSComm MSComm1
- Left = 0
- Top = 0
- _version = 65536
- _extentx = 847
- _extenty = 847
- _stockprops = 0
- cdtimeout = 0
- commport = 1
- ctstimeout = 0
- dsrtimeout = 0
- dtrenable = -1 'True
- handshaking = 0
- inbuffersize = 1024
- inputlen = 0
- interval = 1000
- nulldiscard = 0 'False
- outbuffersize = 512
- parityreplace = "?"
- rthreshold = 0
- rtsenable = 0 'False
- settings = "9600,n,8,1"
- sthreshold = 0
- End
- Attribute VB_Name = "frmcomm"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub Combo1_Change()
- End Sub
- Private Sub cmdDial_Click()
- If Len(comCommPort.TEXT) = 0 Then
- MsgBox " You must Select a Communications Port prior to Dialing"
- Exit Sub
- End If
- If Len(txtNumber.TEXT) = 0 Then
- MsgBox " You Have Not Entered a Number Dial "
- Exit Sub
- End If
- MSComm1.Settings = comLineSpeed.TEXT & "," & Mid$(comParity.TEXT, 1, 1) & "," & comDataBits.TEXT & "," & comStopBits.TEXT
- MSComm1.PortOpen = True
- MSComm1.Output = "ATDT" & "9," & txtNumber.TEXT & Chr$(13) ' Dial the requested number
- End Sub
- Private Sub cmdHangUp_Click()
- MSComm1.Output = "ATH0" + Chr$(13)
- MSComm1.PortOpen = False
- End Sub
- Private Sub comCommPort_Click()
- Select Case comCommPort.TEXT
- Case "Com1:"
- MSComm1.CommPort = 1
- Case "Com2:"
- MSComm1.CommPort = 2
- Case "Com3:"
- MSComm1.CommPort = 3
- Case "Com4:"
- MSComm1.CommPort = 4
- End Select
- End Sub
- Private Sub comDataBits_Change()
- End Sub
- Private Sub Form_Load()
- comCommPort.AddItem "Com1:"
- comCommPort.AddItem "Com2:"
- comCommPort.AddItem "Com3:"
- comCommPort.AddItem "Com4:"
- comDataBits.AddItem "8"
- comDataBits.AddItem "7"
- comLineSpeed.AddItem "19200"
- comLineSpeed.AddItem "14400"
- comLineSpeed.AddItem "9600"
- comLineSpeed.AddItem "4800"
- comLineSpeed.AddItem "2400"
- comLineSpeed.AddItem "1200"
- comParity.AddItem "N- None"
- comParity.AddItem "O - Odd"
- comParity.AddItem "E - Even"
- comParity.AddItem "E - Mark"
- comParity.AddItem "S - Space"
- comStopBits.AddItem "1"
- comStopBits.AddItem "1.5"
- comStopBits.AddItem "2"
- End Sub
- Private Sub MSComm1_OnComm()
- End Sub
- Private Sub txtNumber_Change()
- End Sub
-