[.net] Getting active form
Maybe you can use "System.Windows.Forms.Form.ActiveForm".
It will give you the currently active form. From there you can see if it's the form you're looking for.
It will give you the currently active form. From there you can see if it's the form you're looking for.
I looked at System.Windows.Forms.Form.ActiveForm, but it seems to be the current active form in my application, not on the entire desktop.
what about something like:
System.Windows.Forms.Form.ActiveForm.Focused
Focused returns false if an other form is active.
System.Windows.Forms.Form.ActiveForm.Focused
Focused returns false if an other form is active.
I was working around this because the OtherApplicationHasPriorityException =/
and well, i found that it can be useful do
if System.Windows.Forms.Form.ActiveForm is this/Me [then] C#/VB
inside the form to know if the form it's active in the foreground.
I revive this hopping help someone else with the same problem
and well, i found that it can be useful do
if System.Windows.Forms.Form.ActiveForm is this/Me [then] C#/VB
inside the form to know if the form it's active in the foreground.
I revive this hopping help someone else with the same problem
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement