From: BeeJ on 5 Aug 2010 15:43 I am trying to close an external VB6 app. I am setting all timers .Enabled = False. ( I read that this is not necessary but I do it anyway ) I am UnLoading all Forms. Well, I am commanding it but maybe something is not letting me close. Do I need to disable API timers? In one I have COMM open so I set PortOpen to False. Most of my external apps close properly. What else do I need to do?
From: ralph on 5 Aug 2010 18:19 On Thu, 05 Aug 2010 12:43:12 -0700, BeeJ <nospam(a)nowhere.com> wrote: A few questions inline: >I am trying to close an external VB6 app. What exactly do you mean by an "external VB6 app"? Do you mean a free-standing executable? Does it appear to close properly in the IDE but fail when released? >I am setting all timers .Enabled = False. ( I read that this is not >necessary but I do it anyway ) >I am UnLoading all Forms. Well, I am commanding it but maybe something >is not letting me close. Need to see how you are "commanding" this. It is easy to accidently make a call which "re-loads" a form. >Do I need to disable API timers? >In one I have COMM open so I set PortOpen to False. >Most of my external apps close properly. >What else do I need to do? > VB normally "hangs" because an object reference (Form, Class, external library, etc.) is left open, (not set to Nothing). Usually API items, etc. are cleaned up by the O/S - there may be some delay if watching in the TaskManager, but seldom cause a program to "hang". Though ALWAYS best to do your own cleanup. One defensinve debugging practice is to provide a count and a log of opening/closing to check objects of your own creation. Take a look at the VB Class Builder. If you select the "debug" options, you will note VB will insert 'debugmode' code. Create a simple class, save it, then examine the code. You can easily adapt this mechanism to wrap your Forms and Classes.
From: Kevin Provance on 5 Aug 2010 18:31 "ralph" <nt_consulting64(a)yahoo.net> wrote in message news:5o7m5658cvknk56v38i75r73ttjm6trs8t(a)4ax.com... : : VB normally "hangs" because an object reference (Form, Class, external : library, etc.) is left open, (not set to Nothing). Usually API items, : etc. are cleaned up by the O/S - there may be some delay if watching : in the TaskManager, but seldom cause a program to "hang". Though : ALWAYS best to do your own cleanup. Ouch. Open a DC and leave it that way. The app exiting however properly will still leave a great big leak. I've always been taught that VB is *supposed* to clean up for you, but never to trust it to do so. That said - to the OP - clean up/destory everything you create. It leaves less to chance.
From: BeeJ on 5 Aug 2010 18:55 Thanks for the clues. BTW I sometimes get the error message 'too many quoted lines' when I try to reply. What is that?
From: Tony Toews on 5 Aug 2010 19:23 On Thu, 05 Aug 2010 15:55:06 -0700, BeeJ <nospam(a)nowhere.com> wrote: >BTW I sometimes get the error message 'too many quoted lines' when I >try to reply. What is that? Probably coming from your newsreader. The quoted lines are the lines which start with > Tony (sometimes known as the trim king) -- Tony Toews, Microsoft Access MVP Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/ For a convenient utility to keep your users FEs and other files updated see http://www.autofeupdater.com/
|
Next
|
Last
Pages: 1 2 Prev: Stumped with msflexgrid column zero row selection. Next: RegClean Revisited |