Home All Groups Group Topic Archive Search About

create usercontrol that cannot get focus

Author
11 Aug 2006 11:07 AM
quelhaslima
I'm trying to create a user control which cannot get focus, but is enabled.
In VB6, I just set the CanGetFocus property to false, but I can't find the
..NET equivalent.
The .NET CanFocus property is ReadOnly.

Author
11 Aug 2006 11:27 AM
Ken Tucker [MVP]
Hi,

            In the controls new procedure

me.SetStyle(controlstyles.selectable,false)

http://msdn2.microsoft.com/en-us/library/system.windows.forms.control.setstyle.aspx

http://msdn2.microsoft.com/en-us/library/system.windows.forms.controlstyles.aspx


Ken
------------------
<quelhasl***@hotmail.com> wrote in message
Show quoteHide quote
news:89802399-6998-45A2-B0D9-FFD7CA35D915@microsoft.com...
>
> I'm trying to create a user control which cannot get focus, but is
> enabled.
> In VB6, I just set the CanGetFocus property to false, but I can't find the
> .NET equivalent.
> The .NET CanFocus property is ReadOnly.