|
-
Jun 15th, 2008, 08:36 PM
#1
Thread Starter
Lively Member
how to close program ?
what function use close program?
-
Jun 15th, 2008, 09:18 PM
#2
Re: how to 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.
-
Jun 15th, 2008, 09:30 PM
#3
Re: how to close program ?
I think you should try being more specific...
Close what program? Yours? Another one?
-
Jun 16th, 2008, 07:39 AM
#4
Re: how to close program ?
I assumed his own app...
-
Jun 16th, 2008, 08:38 AM
#5
Re: how to close program ?
So did I until I saw DigiRev's question. Now, however, I'm more guessing it is an external app.
-
Jun 16th, 2008, 01:29 PM
#6
Re: how to close program ?
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.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jun 16th, 2008, 02:12 PM
#7
Re: how to close program ?
 Originally Posted by RobDog888
I would assume its an external app because closing your own is kind of basic...
For some of us but not all of us.
-
Jun 16th, 2008, 02:26 PM
#8
Re: how to close program ?
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" 
But I digress until further information is clarified by the OP.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jun 17th, 2008, 01:26 AM
#9
Addicted Member
Re: how to close program ?
 Originally Posted by RhinoBull
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.
how is this work exactly done......... release memory before...... closing my own app !!
●════════════════════════════◄►═════════════════════════●
___itš bεttεг tΘ bε απ Θρεπ šiππεг, thαπ α ƒαlšε šαiπt___
●════════════════════════════◄►═════════════════════════●
гαj
-
Jun 17th, 2008, 02:32 AM
#10
Re: how to close program ?
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
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jun 17th, 2008, 02:55 AM
#11
Re: how to close program ?
...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)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|