xnederlandx
Member
Hi,
I want to make a interface to my picaxe.
I have Microsoft Visual Basic 2008 Express Edition and NetCommOCX.
Does anyone have any working code snippets to help?
My Basic:
main:
SERTXD ("Hello")
pause 500
goto main
My Visual Basic (derived from Tarzan's):
Private Sub NETComm1_OnComm(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NETComm1.OnComm
With NETComm1
.CommPort = 4
.DTREnable = True
.Handshaking = 0
.InputLen = 0
.NullDiscard = True
.RThreshold = 1
.RTSEnable = True
.set_Settings(2400, N, 8, 1)
.SThreshold = 1
End With
Dim rData As String
If NETComm1.CommEvent = comEvReceive Then 'If comEvReceive Event then get data and display
rData = NETComm1.InputData
TextBox1.Text = CStr(rData)
End If
End Sub
End Class
I have bolded and coloured red the errors.
I am unsure on how to fix them.
I am using VB.Net 2008
I want to make a interface to my picaxe.
I have Microsoft Visual Basic 2008 Express Edition and NetCommOCX.
Does anyone have any working code snippets to help?
My Basic:
main:
SERTXD ("Hello")
pause 500
goto main
My Visual Basic (derived from Tarzan's):
Private Sub NETComm1_OnComm(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NETComm1.OnComm
With NETComm1
.CommPort = 4
.DTREnable = True
.Handshaking = 0
.InputLen = 0
.NullDiscard = True
.RThreshold = 1
.RTSEnable = True
.set_Settings(2400, N, 8, 1)
.SThreshold = 1
End With
Dim rData As String
If NETComm1.CommEvent = comEvReceive Then 'If comEvReceive Event then get data and display
rData = NETComm1.InputData
TextBox1.Text = CStr(rData)
End If
End Sub
End Class
I have bolded and coloured red the errors.
I am unsure on how to fix them.
I am using VB.Net 2008
Last edited: