Hi

I am trying to lock fields on my form (VB.NET), so that they cannot be
edited by the user. So far I have accomplished my goal for the text box
by setting its read only property. But what should I do for combo box
and mask edit box (added as an reference). list box etc. I don't want to
use the enabled property, since that makes the controls text to fade or
not seen prominently.

Does anyone know how can we achieve this in VB.NET ??

Thanks



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Re: Lock fields by letsdotnet

letsdotnet
Wed Sep 24 18:33:46 CDT 2003

For ComboBox set DropDownStyle property to DropDownList

With ListBox: a user cannot edit the contents anyway, so you need not worry.


Deepak

#*#*#*#*#*#*#*#*#*#*#*
I Code therefore I am

Harshil Patel <harshil.patel@ptdtechnology.com> wrote in message news:<Oeln2#pgDHA.3616@TK2MSFTNGP11.phx.gbl>...
> Hi
>
> I am trying to lock fields on my form (VB.NET), so that they cannot be
> edited by the user. So far I have accomplished my goal for the text box
> by setting its read only property. But what should I do for combo box
> and mask edit box (added as an reference). list box etc. I don't want to
> use the enabled property, since that makes the controls text to fade or
> not seen prominently.
>
> Does anyone know how can we achieve this in VB.NET ??
>
> Thanks
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!