hi,all

I have a control ,when the control gets foucs.
I do not want to lost focus unless this control release focus by self.

How to do it?

thanks

Re: about Focus by Mark

Mark
Tue Jul 05 07:11:11 CDT 2005

Capture the lostFocus event of the control and use a bool flag to see if the control should lose focus or not. For example:

private void Control_LostFocus(object sender, System.EventArgs e)
{
if(!loseFocus)
((Control)sender).Focus();
}

You will have to manage the bool (loseFocus) throughout your code.

---
Mark Arteaga