Active window

  • Thread starter Thread starter Sebastiano
  • Start date Start date
S

Sebastiano

I want my Windows Form application to catch the current active window, doing
some works, and then reactivate the previous window. How can I do this with
..NET Framework? Or I have to use API functions?

Many thanks

Sebastiano
 
Try the static property Form.ActiveForm to obtain it, and calling Activate()
on the form to make it active again.
 
But the active application/window isn't part of my program...it may be any
windows program! My application runs in background and, when a particular
event occur, it shows in foreground and becames the new active window. At
this time a want to save "a reference" to the old active window, so I can
reactive it when the user put another time in background my application.

I hope I have been more clear now

Sebastiano
 
Back
Top