- Aug 6, 2008
- 193
- 2
- 65
Im using vb 6.0 to create a server launcher so ive use the shell command to open the server but when its comes to closing ive had trouble anyone know an easy way to end a exe using vb
The only way i know is to call APIs
Could use findwindow and sendmessage APIs
Ive tryed to dont seem to work or im doing something wrong
Updated
ok i got the APIs findwindow and sendmessage working
but now i run into the dialogbox msg yes or no lol
when i use the Spy ++ app to find the handle it returns as #32770(Dialog) its caption is confirm
when i try to close this window it does nothing
So... Ive moved on to trying API SetForeground and using the sendkeys "{enter}" command
it works but only if i pound the button i made for it lol
Anyone have any other ideas on what to try here cause im stumped
btw the scope of this project is to fix the 2.3 server launcher so you can actually end it in processes and Make the server launcher a Parent form for all parts of the server(so you dont have 6 apps open on your start bar) and also put in system tray(even more space) Also add in run on startup options/Auto run server options) making the server much more automated) Could even add in a system time check for reboot times and the ablitity to announce to game players that reboot is about to happen.
This would be very nice for anyone who is running a 2.3 mir server
The only way i know is to call APIs
Could use findwindow and sendmessage APIs
Ive tryed to dont seem to work or im doing something wrong
Updated
ok i got the APIs findwindow and sendmessage working
but now i run into the dialogbox msg yes or no lol
when i use the Spy ++ app to find the handle it returns as #32770(Dialog) its caption is confirm
when i try to close this window it does nothing
So... Ive moved on to trying API SetForeground and using the sendkeys "{enter}" command
it works but only if i pound the button i made for it lol
Anyone have any other ideas on what to try here cause im stumped
btw the scope of this project is to fix the 2.3 server launcher so you can actually end it in processes and Make the server launcher a Parent form for all parts of the server(so you dont have 6 apps open on your start bar) and also put in system tray(even more space) Also add in run on startup options/Auto run server options) making the server much more automated) Could even add in a system time check for reboot times and the ablitity to announce to game players that reboot is about to happen.
This would be very nice for anyone who is running a 2.3 mir server
Last edited: