Re: VB / DLL Issues



The driver does nothing directly to controls on the form. Unloading
and reloading the form does indeed fix the problem. However I tried
your suggestion of a wrapper class and that does not help, despite the
Terminate event firing after I kill the driver. This makes absolutely
zero sense to me and I am now at a dead end loss as to what is going on
or how to fix it... Completely unloading and reloading the form is not
really an option (or not a desired option anyways). Can anyone think
of anything else that I can do? Is it definitely the case that the
driver is unloaded from memory if my class terminates, or could it
still be hanging around somehow? If it is still hanging around, is
there a surefire way for me to get that sucker out of memory?

Thank you kindly in advance (and thanks Ken for trying).


Ken Halter wrote:
<stumorgan@xxxxxxxxx> wrote in message
news:1159990826.612123.252930@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

If you have any other ideas I'd be very very happy, this has been
plaguing me for 2 days now.

Thanks,
Stu


If there are any controls on that form, the form's Got/LostFocus will never
fire so... have you checked the Activate/Deactivate events? Even those won't
fire when switching apps.
Does that driver do something to a control on your form directly? I've heard
of some drivers writing output to a textbox but I've never used any of them.

So, if minimizing fixes the problem, I assume unloading and reloading fixes
things too?

If that's the case, you might try creating a 'wrapper' class to interact
with that driver. After calling the driver's Kill method, destroy the class
and watch for its Terminate event to fire (place a couple of Debug.Prints in
there). If Terminate fires, the next time you create an instance of the
class, you should be back at "square one" as far as the driver's concerned.
Using a class will also eliminate the need to unload/reload the form.

--
Ken Halter - Please keep all discussions in the groups..
In Loving Memory - http://www.vbsight.com/Remembrance.htm

.



Relevant Pages