public MainForm() { InitializeComponent(); radar = new Radar(); radarPictureBox.Paint += RadarPictureBox_Paint; this.Resize += MainForm_Resize; this.FormClosed += MainForm_FormClosed; serialPort = new SerialPort("COM14"); serialPort.BaudRate = 56000; serialPort.Parity = Parity.None; serialPort.StopBits = StopBits.One; serialPort.DataBits = 8; serialPort.Handshake = Handshake.None; serialPort.DtrEnable = true; graph = radarPictureBox.CreateGraphics(); serialPort.DataReceived += new SerialDataReceivedEventHandler(DataReceivedHandler); }