You could use the windows API for MSComm.
I include the example given, it should point you in the right direction if
you have Visual Basic and look up the help for MSComm
====================================================
MSComm Control Example
The following simple example shows basic serial communications using a
modem:
Private Sub Form_Load ()
' Buffer to hold input string
Dim Instring As String
' Use COM1.
MSComm1.CommPort = 1
' 9600 baud, no parity, 8 data, and 1 stop bit.
MSComm1.Settings = "9600,N,8,1"
' Tell the control to read entire buffer when Input
' is used.
MSComm1.InputLen = 0
' Open the port.
MSComm1.PortOpen = True
' Send the attention command to the modem.
MSComm1.Output = "ATV1Q0" & Chr$(13) ' Ensure that
' the modem responds with "OK".
' Wait for data to come back to the serial port.
Do
DoEvents
Buffer$ = Buffer$ & MSComm1.Input
Loop Until InStr(Buffer$, "OK" & vbCRLF)
' Read the "OK" response data in the serial port.
' Close the serial port.
MSComm1.PortOpen = False
End Sub
Note The MSComm control can use polling or an event-driven method to
retrieve data from the port. This simple example uses the polling method.
For an example of the event-driven method, see help for the OnComm event.
================================================
Mike Button. G8YMB
----- Original Message -----
From: "Alan Melia" <[email protected]>
To: <[email protected]>
Sent: Monday, July 17, 2006 10:27 AM
Subject: Re: LF: Re: Re: Re: DFCW on TS450
>
> Hi Nigel, the problem is that even the bought versions of VB (I have 6),
and
> all the expensive thick books, do not have serial comms capability as
> provided (I think it is only in the developer version) and it is very
> difficult to find out how to do it, though I believe there is a file on
the
> CD, there are no instructions for using it.
>
> Cheers de Alan G3NYK
>
> ----- Original Message -----
> From: <[email protected]>
> To: <[email protected]>
> Sent: 17 July 2006 08:40
> Subject: Re: LF: Re: Re: Re: DFCW on TS450
>
>
> >
> > In a message dated 17/07/2006 08:01:38 GMT Daylight Time,
> > [email protected] writes:
> >
> > Where can I get BASIC to run under windows please?. I have recourse to
a
> 20
> > yr. old Amstrad PCW to solve problems, and it will blow up any day
soon.
> >
> >
> >
> > ------------------------------------------------------------
> >
> > I've not tried it so don't know if it's any good for comms but
Microsoft
> > Visual Basic 2005 Express edition is free,
> > It's been given away with various magazines but can also be
> downloaded....
> > _http://msdn.microsoft.com/vstudio/express/vb/_
> > (http://msdn.microsoft.com/vstudio/express/vb/)
> >
> > regards
> >
> > Nigel
> > G8PZR
> >
>
|