Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

prevent lose focus

Posted on 2016-09-15
6
Medium Priority
?
63 Views
Last Modified: 2016-09-20
Is there a way to prevent/cancel a lost focus event in a .NET desktop app?
0
Comment
Question by:HLRosenberger
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 41800475
the whole app or a specific control?
0
 
LVL 27

Assisted Solution

by:Shaun Kline
Shaun Kline earned 500 total points
ID: 41800524
If you need to cancel the lost focus due to validation, you can use the validating event which has that capability.
0
 
LVL 30

Assisted Solution

by:anarki_jimbel
anarki_jimbel earned 1000 total points
ID: 41800635
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 44

Assisted Solution

by:AndyAinscow
AndyAinscow earned 500 total points
ID: 41801062
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
 
LVL 30

Accepted Solution

by:
anarki_jimbel earned 1000 total points
ID: 41804258
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
 
LVL 1

Author Closing Comment

by:HLRosenberger
ID: 41806750
thanks.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question