Jump to content

Stop all other running applications?


Recommended Posts

Guest dieter98
Posted

its possible to stop/end all other applications than mine programmatically ?

VB.net

  • 2 weeks later...
Guest Peter Foot
Posted
its possible to stop/end all other applications than mine programmatically ?

VB.net

<{POST_SNAPBACK}>

With a couple of P/Invokes yes (or use OpenNETCF - www.opennetcf.org/sdf/) See OpenNETCF.Win32.Win32Window class

You'll need to loop through all top level windows using GetWindow with HWND_FIRST then HWND_NEXT. Then check that each is a visible window using GetWindowLong with GWL_STYLE and check for WS_VISIBLE.

Then if you've identified a visible window use SendMessage to send WM_CLOSE to the window to close the application.

Peter

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.