我可以使用哪个文本框事件来显示从Serialport接收的数据 [英] Which Textbox Event Can I Use For Displaying Data Received From Serialport

查看:98
本文介绍了我可以使用哪个文本框事件来显示从Serialport接收的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





正在开发出勤项目。



form1:有menustrip(student_IN, student_out),当我点击Student_in时,将打开另一个表格,然后刷卡,将card_id输入打开表格的学生信息表格的文本框中。



正在编写一种从serialport而不是dataReceived event.so获取数据的方法,我可以在哪里调用该方法(方法包含从serialport接收的数据)以显示数据到打开表单的文本框。



任何想法



am developing attendance project.

form1: is having menustrip(student_IN,student_out), when i click on Student_in , another form will be opened , then swipe the card,get the card_id into textbox of opened form student information form.

am writing a method for getting data from serialport instead of dataReceived event.so where can i call that method (method contains the data received from serialport) to display data into the opened form's textbox.

any idea

推荐答案

你不会在TextBox上使用事件。您在串行端口上使用该事件,当您在那里接收数据时,您将决定该怎么做。它不应该依赖于您的文本框。
You wouldn't use an event on the TextBox. You use the event on the serial port and when you receive data there you then decide what to do. It shouldn't be dependent on your textbox.


这篇关于我可以使用哪个文本框事件来显示从Serialport接收的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆