You can always make control unable to get keyboard focus at all by removing the flag
System.Windows.Forms.ControlStyles.Selectable
from control's style by using
System.Windows.Forms.Control.SetStyle
. This is a
protected method, so you can only call it if you subclass your control and call this method in your derived control's constructor. It will not show any focus cues, of course. You can change the control styles during run-time if you created and expose some method doing so as
internal or
public.
See
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.aspx[
^].
To override the read-only property like
System.Windows.Forms.Control.ShowFocusCues
, just override its getter. Please see this code sample:
http://stackoverflow.com/questions/554369/overriding-readonly-property-in-a-subclass-to-make-it-read-write-vb-net[
^].
A note: if you want to get really good help, I would advise you to stop demanding "not C#". Of course, in MSDN samples you can always switch the declaration and sample code to VB.NET. By that reason, I always prefer showing MSDN references. However, people who can write decent original sample mostly write in C#. This is not anyone's preoccupation but a real-life social phenomena. Microsoft also does not take VB.NET seriously; anyone can see many signs of it. So without understanding of at least some C# you cannot get all the help you need and may have problems in your work. As soon as you start .NET development, understanding of C# is highly desirable.
—SA