来自vb.net的comevreceive [英] comevreceive in vb.net
本文介绍了来自vb.net的comevreceive的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好......
当我在VB.NET中使用'comEvReceive'时如下:
Hi there...
When I'm using 'comEvReceive' in VB.NET as follows:
Select Case MSComm1.CommEvent
Case comEvReceive
bytes = MSComm1.Input
TextBox1.Text = TextBox1.Text & bytes
TextBox1.Refresh()
End Select
VB.NET说:名称'comEvReceive'未声明.... VB.NET中是否存在'comEvReceive'?我应该使用什么?
VB.NET says: Name 'comEvReceive' not declared.... Does 'comEvReceive' exist in VB.NET? What should I use?
推荐答案
VB.NET上的串行通信
通过进行SerialPort
类(您不应再使用VB6
MSComm
控件)。
查看 SerialPort.DataReceived事件文档 [ ^ ]最重要的是,与VB.NET
进行串行通信的好教程(你可以试试这个:VB.Net中的串行通信 [ ^ ]。
Serial communication onVB.NET
happens via theSerialPort
class (you should no more use theVB6
MSComm
control).
Check out the SerialPort.DataReceived event documentation[^] and above all, a good tutorial on serial communication withVB.NET
(you may try this one: "Serial Communication in VB.Net"[^].
这篇关于来自vb.net的comevreceive的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文