请教VB.NET如何编写与串口通信的程序?

alikwok 2004-03-18 04:01:23
如题(新手,望高手们能给出详细的代码,谢谢)
...全文
118 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
alikwok 2004-03-20
  • 打赏
  • 举报
回复
谢谢各位的帮助,现问题已解决^o^
CMIC 2004-03-19
  • 打赏
  • 举报
回复
Ms访问串口的例子
http://msdn.microsoft.com/msdnmag/issues/02/10/NETSerialComm/default.aspx
njx 2004-03-19
  • 打赏
  • 举报
回复
买这期的MSDN开发精选会送Visual Basic.net Resource Kit的:)
Ninputer 2004-03-19
  • 打赏
  • 举报
回复
Visual Basic.net Resource Kit,在msdn.microsoft.com/vbasic下载
alikwok 2004-03-18
  • 打赏
  • 举报
回复
To Ninputer(装配脑袋)
能说举出具体位置吗?

earlsen(earlsen)
RecDataCtl?? 是个什么东东?(我很菜,别笑我*_*)
earlsen 2004-03-18
  • 打赏
  • 举报
回复

Private Sub InitRecDataCtl(ByVal intCom As Integer, ByVal intTimeOut As Integer, ByVal intLength As Integer, ByVal intStop As Integer, ByVal intCheck As Integer, ByVal intSpeed As Integer, ByVal strPath As String, ByVal strSendPath As String)
If intCom = -1 Then
intCom = 0
End If
If intSpeed = -1 Then
intSpeed = 4
End If
RecDataCtl.setcom(intCom) '串口
RecDataCtl.setreqtime(intTimeOut) '10 '响应终止时间
RecDataCtl.setlength(intLength) '0 --8Bit 1 -- 7Bit '数据长度8
RecDataCtl.setparity(intCheck) '校验位 0 None parity,1 Odd parity ,2 Even parity
RecDataCtl.setsbit(intStop) '停止位 1
RecDataCtl.setspeed(intSpeed) '传输速率 0--1200bps 1--2400bps 2--4800bps 3--9600bps 4--19200bps 5--38400bps 6--57600bps 7--115200bps

RecDataCtl.setpath(strPath) '扫描文档路径

End Sub
Ninputer 2004-03-18
  • 打赏
  • 举报
回复
有现成控件,.NET版的,就在Visual Basic.net Resource Kit里
alikwok 2004-03-18
  • 打赏
  • 举报
回复
有用API的吗?

另外,我想检索当前系统中已连接设备的端口(串口)信息,可以实现吗??
banni2003 2004-03-18
  • 打赏
  • 举报
回复
建议楼主参照一下Visual Basic串口通信程序设计
http://it.sohu.com/2004/03/12/04/article219410424.shtml

16,552

社区成员

发帖
与我相关
我的任务
社区描述
VB技术相关讨论,主要为经典vb,即VB6.0
社区管理员
  • VB.NET
  • 水哥阿乐
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧