111,094
社区成员




using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO.Ports;
namespace test_serialport
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
SerialPort1.Portname = "COM2";
SerialPort1.BaudRate = "9600";
}
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO.Ports;
namespace WindowsFormsApplication2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
spPTZ.BaudRate = 9600;
spPTZ.DataBits = 8;
spPTZ.PortName = "Com1";
spPTZ.ReadTimeout = 2000;
spPTZ.StopBits = System.IO.Ports.StopBits.One;
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
}
}
}