You can handle the "Validating" event. Set the control's property of "Causes
validation" to true, as well as the control that follows. And repeat that
for every other control. And, on the Validating eventhandler, set the
CancelEventArgs.Cancel=True;
This will keep the control focused, disallowing that you lose focus. You can
do the same thing to the whole form, or any button on it.
--
Rami Saad
Microsoft GTSC Developer support for Middle East
"Morten Wennevik" <Mo************@hotmail.com> wrote in message
news:op**************@msnews.microsoft.com...
I'm pretty sure this has been mentioned a few times, but so far I haven't
found anything.
I am trying to "lock" a program to always focus, non closable etc, but
overriding OnDeactivate and calling Activate() only works 1 time, and
never again. After the initial refocus it never seems to fire. What else
needs to be done?
Is it possible to just cancel a deactivation completely?
--
The hotmail account will most likely not be read, so please respond only
to the news group.