本帖最后由 shippo 于 2010-9-26 10:40 PM 编辑
回复 48# 绿病毒
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO.Ports;
namespace ConsoleTest
{
class Program
{
static void Main ( string[] args )
{
SerialPort myPort = new SerialPort();
myPort.PortName = "COM1";
myPort.Open();
//myPort.DtrEnable =true or myPort.RtsEnable =true
myPort.Close();
}
}
}
paiseh 我用chrome好像不能code上面的起来。。。
只要test的话用这个就行了,console application.
如果是window form app 你add 一个serialPort 的control 就行了。