JMLStamp2p2
Posts: 7
Joined: Sat Jul 14, 2007 8:07 pm

Need help understanding examples better ...

Mon Aug 20, 2007 1:05 am

Hello,
I am using this code to write HEX data to to my COM1 port and it is
working well. I am using VB 2005, and new to using Fransons Tools so I could use a more examples and a little more help understanding the
code. I simply use "SkinButton14_Click" to send HEX data out the port
and have declared "objPort" in my Form1_Load procedure. Is this all the declarations needed to use all Fransons procedures in the serial port Class?
....................................................................

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim license As New SerialNET.License()
license.LicenseKey = "my License here"
objPort = New SerialNET.Port()
objPort.BufferSize = 4

End Sub
..................................................................

Private Sub SkinButton14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SkinButton14.Click

Dim port As New SerialNET.Port
port.Enabled = True
Dim binary_data As Byte() = {&H3}
port.Write(SerialNET.Port.ByteArrayToString(binary_data))
objPort_Onwritten(Data)
port.Enabled = False

End Sub

Return to “SerialTools”