prevent lose focus

Is there a way to prevent/cancel a lost focus event in a .NET desktop app?
LVL 1
HLRosenbergerAsked:
Who is Participating?
 
anarki_jimbelCommented:
Just in case. I have found the following article that might be interesting:
http://geekswithblogs.net/dapostolov/archive/2009/06/14/the-validating-event-can-prevent-a-form-closing-properly.aspx
0
 
Éric MoreauSenior .Net ConsultantCommented:
the whole app or a specific control?
0
 
Shaun KlineLead Software EngineerCommented:
If you need to cancel the lost focus due to validation, you can use the validating event which has that capability.
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

 
anarki_jimbelCommented:
Just to add to Shaun Kline

See Control.Validating Event


If the Cancel property of the CancelEventArgs is set to true in the Validating event delegate, all events that would usually occur after the Validating event are suppressed.
0
 
AndyAinscowFreelance programmer / ConsultantCommented:
Be very careful - it could end up the only way to use the PC is to pull the power cable out and power it up again.
1
 
HLRosenbergerAuthor Commented:
thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.