To close any program all you do is return execution to the OS from the main function ( why06 got it ). Everything you ever program will always have a main function.
Here i think return 0;
I think he is coding an injector in VB.net i dont know why he want to code stupidness. If it is in VB then it you will have to Inject then add.
Code:
System.Threading.Thread.Sleep(10000)Me.Close()'Or you can do Application.Exit()
if it is C++.
as why said.
Code:
return 0;
return 0 will only work when you return in the main thread. use exit or terminateprocess
VB:
[highlight=vbnet]System.Threading.Thread.Sleep(10000)[/highlight]
Will cause your program to freeze if you don't run it from a seperate thread.
C++:
[highlight=c++]Sleep(10000)[/highlight]
IPC, inter process communication, get your thread to let your application know if it successfully attached and executed the procedure/function if all is good then close the injector else keep it open, While timers and on button click events are fine they are not really closing the app on a success, instead they will close app no matter what happends