using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO.Ports; namespace UAS_MES_NEW.CustomControl.ComBoxWithFocus { public partial class SerialPortCombox : UserControl { public SerialPortCombox() { InitializeComponent(); } public override string Text { get { return ComCombox.Text; } set { ComCombox.Text = value; } } private void SerialPortCombox_Load(object sender, EventArgs e) { ComCombox.Items.AddRange(SerialPort.GetPortNames()); } } }