what function use close program?
Printable View
what function use close program?
You'd have to unload each and every form that's currently open.
While unloading forms you'd have release memory by setting all public object variables to nothing, resetting all public arrays, string variables, etc, etc, etc...
There are many threads about this so try searching.
I think you should try being more specific...:rolleyes:
Close what program? Yours? Another one?
I assumed his own app... :rolleyes: :confused:
So did I until I saw DigiRev's question. Now, however, I'm more guessing it is an external app.
I would assume its an external app because closing your own is kind of basic.
You would have to use some APIs to find the window handle of the other app and then SendMessage or Postmessage to send a WM_QUIT or WM_CLOSE message.
For some of us but not all of us.Quote:
Originally Posted by RobDog888
Well true its never 100% but even looking at all new members on the Forums I havent seen this question for their own app. They will usually be using the dreaded "End" :D
But I digress until further information is clarified by the OP. ;)
Quote:
Originally Posted by RhinoBull
how is this work exactly done......... release memory before...... closing my own app !!
He has stated it in the post and your quote of his post. ;)
If you still need help then check Martins funciton "UnloadOtherForms" in this post.
http://www.vbforums.com/showpost.php...31&postcount=5
...or for a fuller explanation (and several code examples), see the article How should I close my form/program/class? from our Classic VB FAQs (in the FAQ forum, which is shown near the top of our home page)