Tab Key (Focus Change) Causes Refresh
I have a lovely gradient on a label on my form, as decoration. However every time the tab key is pressed, the label's graphics clear. This only happens when Tab is pressed, not when focus is changed manually or on any other keypress.
I tried putting the draw code into the Paint event on the label, doesn't work. Ditto for the paint event on the main form. Somehow it is refreshing without calling Paint()?
I can't remove the tabstops because the user needs to be able to tab. I can't catch a Tab keypress without a horrendous amount of work, apparently.
Is there a form event that will tell me when the focus changes within the form? Or am I going to have to add an Enter event to every control I want to tab to?
I am totally at a loss here - it's probably something simple, but I can't work it out.
Thanks,
Andrew
Re: Tab Key (Focus Change) Causes Refresh
Did you create the label by inheriting the base label control ?? You can also use (register in) the Invalidated event handler that's implemented in the Form and base controls . It's weird btw ...