Hi i am trying to write a simple programme to allow the user to open and read data from a RS232 port on a medical equipment and save the data into text file. Iam not a techie. I am totally new to programming save a few projects in foxpro(lol.....yeah oldshool).

can anyone help , i have vb2008 express edition.

Bejoy

Recommended Answers

All 4 Replies

A quick tutorial:
http://msdn.microsoft.com/en-us/library/bb972257(es-es).aspx

The tutorial is in Spanish and no English version found.
The code examples are clear. You can babelfish a little for the translation.
:)

Dear Lola,

I have tried invain to translate the page. I am unable to understand the explainations for each module. Can you please help.
I really want to understand how it is done. Thanks for replying it was kind of you.
Bejoy

Member Avatar for redback93

Hi i am trying to write a simple programme to allow the user to open and read data from a RS232 port on a medical equipment and save the data into text file. Iam not a techie. I am totally new to programming save a few projects in foxpro(lol.....yeah oldshool).

can anyone help , i have vb2008 express edition.

Bejoy

Public Class Form1

    Private Sub SerialPort1_DataReceived(ByVal sender As System.Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived
        Dim writeFile As New System.IO.StreamWriter("Read.txt")
        writeFile.Write(SerialPort1.ReadChar())
        writeFile.Close()
    End Sub
End Class
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.