Close Programs
BlitzPlus Forums/BlitzPlus Programming/Close Programs
| ||
Does anyone know a way for blitz to close other programs, such as hit this button to open this program; or hit this button to close it. I need this for an emulator I am setting up. Thanks |
| ||
For killing the Process: http://www.blitzbasic.com/Community/posts.php?topic=45985 For Obtaining the Process ID (PID): http://www.blitzbasic.com/codearcs/codearcs.php?code=755 |
| ||
That is great, but this www.blitzbasic.com/codearcs/codearcs.php?code=755 is a little more than I need. Is there a way to just have something kill the program using the PID if the name is correct, for example if it finds notepad.exe to kill it. Thanks |
| ||
Maybe the DestroyWindow api ? I never tried it though. http://msdn2.microsoft.com/en-us/library/ms632682.aspx It is a user32.dll command. It needs the windows hwnd. |
| ||
I think I got it with the previous code that you gave me, thanks; Plash and b32 |
| ||
...is a little more than I need. Well yeah, I was just giving you an idea of what your looking at here, you could strip down the whole Process list, not store all the process data in a type, and check the process names as they come in until you find the one your looking for. If DestroyWindow isn't what you thought it was post back and maybe we can work something out. |
| ||
Thats what how I got it to work... I think |