"Paul Close" <su*****@computerdoctor.com.au> schrieb:
How does one make all controls on a Windows form read-only? Controls such
as check boxes, combo boxes and date time pickers dont appear to have a
read-only property. Disabling the controls makes them hard to read and you
cant select/copy the contents of text boxes.
I doubt that this is possible without using replacements for some of the
controls. You'll find some replacements for common controls which support a
read-only mode. The article
<URL:http://www.codeproject.com/cs/miscctrl/ReadOnlyComboBox.asp> showcases
a read-only combobox control, for example. In addition to using replacement
controls you can selectively set controls to read-only mode or disable them
based on their type. To do that, recursively enumerate the controls on the
form and check their type using 'TypeOf...Is...'.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>