J
JDeats
I have a Windows Forms application in which I need to be able to trap
on an event when the application itself has lost focus (e.g. if the
user clicks on another application they have opened on the task bar and
that application comes into focus -or- if the go to the Start menu and
launch another application, any scenaio that would lead to a
application being launched or one that's already running taking primary
focus away from my app, I need to trap on)
So, from what I can tell there is no event off of
System.Windows.Forms.Form to handle this, so I'm looking to the Win32
API and wondering if there is an OS message I can listen for in my C#
application (you'll have to excuse my ignorance of the Win32 API
process model, it's been a while) to tell me when the user has decided
to switch to another application... and when they decide to switch back
to mine.
Thanks
Jeremy
on an event when the application itself has lost focus (e.g. if the
user clicks on another application they have opened on the task bar and
that application comes into focus -or- if the go to the Start menu and
launch another application, any scenaio that would lead to a
application being launched or one that's already running taking primary
focus away from my app, I need to trap on)
So, from what I can tell there is no event off of
System.Windows.Forms.Form to handle this, so I'm looking to the Win32
API and wondering if there is an OS message I can listen for in my C#
application (you'll have to excuse my ignorance of the Win32 API
process model, it's been a while) to tell me when the user has decided
to switch to another application... and when they decide to switch back
to mine.
Thanks
Jeremy