工具箱中的COM端口在VS2013中的组件下发生了什么? [英] What happen to the COM port in Toolbox under components in VS2013?

查看:78
本文介绍了工具箱中的COM端口在VS2013中的组件下发生了什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我过去曾使用过COM端口与外部处理器STM32进行通信。我很高兴看到COM端口仍在VS2010中。我只是记不起用什么参考?

I have used the COM ports in the past to communicate with outside processors STM32. I am glad to see COM ports are still in VS2010. I just cannot remember what Reference to use?

推荐答案





你只需要参考< b>系统项目。



然后在使用子句中添加 System.IO.Ports



类名是SerialPort,您不必将其放在表单上。您可以从代码中实例化它:



Hi,

You need only reference to System in your project.

Then in using clause add System.IO.Ports.

Class name is SerialPort and you don't have to put it on your form. You can instantiate it from your code:

var sp = new SerialPort();
sp.BaudRate = 9600;
sp.PortName = "COM1";
..





[更新]

我刚刚下班回家并运行Visual Stusio 2013年快递。默认情况下有一个标签'组件'可见,上面有Seri​​alPort项目。

如果您没有此项目,只需单击该选项卡上的鼠标右键,然后选择选项。然后转到.NET Framework Coponents选项卡并开始在Filter文本框中键入Serial Port。然后只需单击上面列表中的项目SerialPort以突出显示该项目,然后单击确定按钮。

另一个选项是选择重置工具箱选项以恢复默认值。



干杯!



[Update]
I just arrived home from work and run Visual Stusio 2013 Express. There is a tab 'Components' visible by default and there is SerialPort item on it.
If you don't have this item simply just click Right Mouse Button on that tab and select option Choose Items. Then go to the .NET Framework Coponents tab and start typing Serial Port on Filter textbox. Then just click on item SerialPort on the list above to highlight that item and then Click 'OK' button.
Another option is to select Reset toolbox option to get back to defaults.

Cheers!


这篇关于工具箱中的COM端口在VS2013中的组件下发生了什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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