[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 279
  • Last Modified:

Check if the form has the focus compect framework

I try to restrict some code to run only if this form has the focus.

How can I check that?
0
Mr_Ezi
Asked:
Mr_Ezi
1 Solution
 
alexey_gusevCommented:
you might have a look at this thread: http://www.artisticode.com/Downloads/138.aspx

so the idea is to use GetForegroundWindow() and compare it with Form.Handle
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now