请问VC6++里的控件MSComm,则么在.Net下的C#实现 请问VC6++里的控件MSComm,则么在.Net下的C#实现. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我现在做是主要是串口通讯的工作,以前用过VC6++的MSComm控件,现在写程序用的是.NET 的C#我在VS2003里好象没有看见有MSComm的控件 mscomm是VB里带的,是个ActiveX控件,注册之后,通过添加COM组件以ActiveX的方式使用 vs 2003 下没有 msComm 组件 .net framework 1.1vs 2005 下才有 msComm 组件 .net framework 2.0可以使用一个现成的 类,里面调用 WIN32 APIhttp://msdn.microsoft.com/msdnmag/issues/02/10/netserialcomm/ 用C#写串口通讯的资料很少啊!有人能给点吗?我现在是用VS.net 2003 提醒一下.在处理OnComm事件的时候要先关闭中断,处理完了再打开中断不然会出现 中断嵌套的.切记切记 try { short Com=short.Parse(this.comboBox1.Text.Trim().Substring(3,1)); //MessageBox.Show(this.comboBox1.Text.Trim().Substring(2,1)); string Settings=this.Cb_Rate.Text.Trim()+",n,8,1"; if(this.axMSComm1.PortOpen==true) { this.axMSComm1.PortOpen=false; this.axMSComm1.CommPort=Com; this.axMSComm1.Settings=Settings; this.axMSComm1.InputMode =MSCommLib.InputModeConstants.comInputModeBinary;//接收数据的类型 this.axMSComm1.RThreshold = 1; this.axMSComm1.InputLen=0; this.axMSComm1.PortOpen=true; } } catch(Exception ex) { MessageBox.Show(ex.ToString()); } 没分数求帮助 关于C# 登录窗口 wpf datagrid 问题 一个Linq 问题 多线程操作数据库的问题 文件大小和空间的关系 如何开发一个局域网访问外网的记录日志的软件 自定义 RichTextBox 滚动条问题 请问 System.Diagnostics.Process.Start打开网页。 c# web.mail发送附件问题 无法通过编译,各位大侠帮我看看怎么回事。 问一个弱弱的问题 [DataField("Title")] 这样的字段是怎么实现的??? 类设计器的问题
我在VS2003里好象没有看见有MSComm的控件
vs 2005 下才有 msComm 组件 .net framework 2.0可以使用一个现成的 类,里面调用 WIN32 APIhttp://msdn.microsoft.com/msdnmag/issues/02/10/netserialcomm/
{
short Com=short.Parse(this.comboBox1.Text.Trim().Substring(3,1));
//MessageBox.Show(this.comboBox1.Text.Trim().Substring(2,1));
string Settings=this.Cb_Rate.Text.Trim()+",n,8,1";
if(this.axMSComm1.PortOpen==true)
{
this.axMSComm1.PortOpen=false;
this.axMSComm1.CommPort=Com;
this.axMSComm1.Settings=Settings;
this.axMSComm1.InputMode =MSCommLib.InputModeConstants.comInputModeBinary;//接收数据的类型
this.axMSComm1.RThreshold = 1;
this.axMSComm1.InputLen=0;
this.axMSComm1.PortOpen=true;
}
}
catch(Exception ex)
{
MessageBox.Show(ex.ToString());
}