If you are talking about closing the IDE then as far as I know you cannot code a program to close itself as well as the IDE unless the program is an Addin.
All I had to do was step outside on a cigarette break and explain the situation to a co-worker. Ever notice that when you explain a problem to someone else, that's when you figure out the solution?
Duh - all I had to do was turn it into an .exe......
Assuming you're talking about your app compiled to an exe.
You need to destroy all instances of your forms.
But to make sure you don't leave stuff still referenced.
Otherwise an object may still be referenced even after quitting.
So a simple example could be;
place an Exit button on appropriate form.
Code behind the form logic could be for example;
unload form3
unload form2
if any object set then
set object3=nothing
set object2=nothing
set object1=nothing
unload form1
It uses only one form and I do unload and set it to nothing.
It's a combination of those two lines of code and compiling it into an .exe that helped me acheive what I was trying to do. Thanx for the reminder....
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.