Dialer Failing Under VB2010 beta

  • Thread starter Thread starter Bitz
  • Start date Start date
B

Bitz

Posted this under vb.controls in error and am now reposting here, before I
get chewed out over there<g>. I did so indicate in the vb.controls
newsgroup.

Richard Grier helped me port the code, below, from using MSCOMM32.OCX to
using the Serial Port object in VB8. It has worked fine under VB8 for a
couple of years. I just compiled under VB2010 beta and it longer works- no
error, just does not dial. Appreciate anybody that might help me
understanding. I have been dependent on my dialer, first written under an
early VB, for years - these old fingers need it even more today<g>. Yes, I
could just stay happy with my VB8 compiled version but, now retired, trying
to keep up with the technology is just a fun challenge
Bitz

Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim results As String = ""
Dim strPort As String
Const STR_DIAL As String = "999-999-9999"
SerialPort1.Close()
strPort = "COM3"
SerialPort1.PortName = strPort
SerialPort1.BaudRate = 9600
SerialPort1.Open()
SerialPort1.Write("ATV1Q0" & Microsoft.VisualBasic.ChrW(13))
Do
results = results & SerialPort1.ReadExisting
Loop Until InStr(results, "OK") > 0
SerialPort1.Write("ATDT " & STR_DIAL & ";" & vbCr)
MessageBox.Show("Click OK to talk, or dissconnect")
SerialPort1.Close()
End Sub
End Class
 
Grier responded to my request for help and encouraged me to investigate with
more thoroughly offering some ideas. Writing this note is very embarrassing
because
it took me too long to discover the problem was simply with a loose RJ11
connector from modem to wall. Sorry to have bothered so many.
Bitz
 
Back
Top