0
votes

I'm going to be writing a small app based on the .NET SerialPort class.

Is there a generic dialog available for setting the port settings, ala baud rate, data bits, stop bit, parity bit, flow control, etc? I didn't see one in the MSDN documentation, but I would think that one exists, since that stuff doesn't change.

4
There is none in the .NET framework.Hans Passant

4 Answers

2
votes

True it doesn't change, however there isn't exactly a lot of applications configuring serial port applications nowadays. I can't prove a negative, of course, but seeing as how the .NET platform is lacking a print preview dialog, I'd say you're out of luck finding one for configuring serial ports.

I'd look into win32 dialogs. There might be one available to unmanaged folks somewhere for configuring serial ports that you can invoke. Most likely, even if there is one, it would require more heavy lifting than it is worth.

2
votes

There is no built-in dialog for this, but it is relatively easy to build your own with a few combo-boxes on a form.

2
votes

I know it's way too late for an answer, but you might be able to use or at least pick up some ideas from the Serial Port Configuration Dialog (written in VB) http://www.codeproject.com/KB/vb-interop/CommConfig.aspx?msg=2303895

1
votes

Use a PropertyGrid to edit

 propertyGrid1.SelectedObject = port;

enter image description here