textBox实时显示接收到的串口数据

qixmwying 2013-08-14 05:00:23
那位大虾做过textBox实时显示接收到的串口数据,我用委托的方法能显示数据,但是不能实时更新,望指导呀!
...全文
454 8 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
周美文 2013-08-15
  • 打赏
  • 举报
回复
引用 3 楼 qixmwying 的回复:
updateText = new UpdateTextEventHandler(UpdateTextBox); //test public void Receive_DataReceived(object sender,Ports.SerialDataReceivedEventArgs e) { readString = date.ToString(); this.Invoke(updateText,new string[] {readString}); } private void UpdateTextBox(string text) { }
你有在接收数据的时候处理数据吗?
qixmwying 2013-08-15
  • 打赏
  • 举报
回复
有没有那位大虾做过这个咚咚呀!给予指导呀
qixmwying 2013-08-15
  • 打赏
  • 举报
回复
处理了数据了呀! 还有我如何在判断数据超限后让textBox闪烁
leafmao 2013-08-14
  • 打赏
  • 举报
回复
引用 3 楼 qixmwying 的回复:
updateText = new UpdateTextEventHandler(UpdateTextBox); //test public void Receive_DataReceived(object sender,Ports.SerialDataReceivedEventArgs e) { readString = date.ToString(); this.Invoke(updateText,new string[] {readString}); } private void UpdateTextBox(string text) { }
是不是data没更新
qixmwying 2013-08-14
  • 打赏
  • 举报
回复
就是不能实时刷新数据呀!
qixmwying 2013-08-14
  • 打赏
  • 举报
回复
updateText = new UpdateTextEventHandler(UpdateTextBox); //test public void Receive_DataReceived(object sender,Ports.SerialDataReceivedEventArgs e) { readString = date.ToString(); this.Invoke(updateText,new string[] {readString}); } private void UpdateTextBox(string text) { }
江湖评谈 2013-08-14
  • 打赏
  • 举报
回复
启用UI异步线程,在接收数据的时候进行适时的更新和加载。
leafmao 2013-08-14
  • 打赏
  • 举报
回复
为什么不能实时更新呢? 收到串口数据的时候就把数据更新到UI上呀

111,092

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • AIGC Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

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