如何在vb.net中一次动态地打开多个端口 [英] how to open multiple ports dynamically at a time in vb.net

查看:60
本文介绍了如何在vb.net中一次动态地打开多个端口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我正在使用一个与com端口通信的项目.但是我一次只能看到一个端口.在这里,我需要从可用端口列表中选择两个或四个.无论数字是多少,但是所有选择的端口应一次打开并同时运行.

例如,我的组合框中有com1,com2,com4,com8,com9端口,我将在运行时选择com2,com4,com9.
三个应一次打开.三个应单独运行.它们应该自动显示数据.我必须能够与打开的端口进行通信.

请帮帮我.

非常紧急的

Hi all

I am using a project that communicates with the com ports.but i can see a single port at a time.here what i need is from a list of ports available i''ll choose two or four.what ever the number is,but all ports choosen should be opened at a time and should run simultaneously.

for example,i have com1,com2,com4,com8,com9 ports in my combo box,i''ll choose com2,com4,com9 at run time.
the three should be opened at a time.the three should run individually.automatically they should display data.and i must be able to communicate with the ports opened.

please help me.

very urgent

推荐答案

下面是一个链接,可助您一臂之力.技巧是简单地打开多个com端口,并在接收事件中通过sender参数提取它来自的com端口.


http ://www.dreamincode.net/forums/topic/67262-how-to-open-and-read-from-multiple-serial-ports-at-the-same-time/ [ ^ ]

祝你好运!
Here is a links to get you on your way. The trick is to simply open multiple com ports and in the receive event get extract the com port it''s coming from by the sender parameter.


http://www.dreamincode.net/forums/topic/67262-how-to-open-and-read-from-multiple-serial-ports-at-the-same-time/[^]

Good luck!


这篇关于如何在vb.net中一次动态地打开多个端口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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