Re: Newbie: How to tell where a form has been unloaded

Tech-Archive recommends: Fix windows errors by optimizing your registry



tom wrote:
I have to communicate with 2 forms from one thread. The one thread
needs to manage data acquistion hw and pump data out to the 2 forms.

So I am using Main as the one central thread, creating the form
objects in main. To pump data into the forms, I am providing a public
subroutine in the forms that Main can call.

Main gets data from the hw 100 times a second and calls the public
form subroutines.

But, the user can close one or both of the forms. Main will have to
stop pumping out data when the form is unload, but how to I detect
that a form is unloaded in Main?

Use the form Unload event.

Reading the section in the online help on "Creating a User Interface" in the Programmer's Guide will give an overview that is useful...

--
.



Relevant Pages

  • Re: Newbie: How to tell where a form has been unloaded
    ... needs to manage data acquistion hw and pump data out to the 2 forms. ... So I am using Main as the one central thread, ... form subroutines. ... stop pumping out data when the form is unload, ...
    (microsoft.public.vb.general.discussion)
  • Newbie: How to tell where a form has been unloaded
    ... needs to manage data acquistion hw and pump data out to the 2 forms. ... form subroutines. ... stop pumping out data when the form is unload, ...
    (microsoft.public.vb.general.discussion)
  • Re: Newbie: How to tell where a form has been unloaded
    ... needs to manage data acquistion hw and pump data out to the 2 forms. ... So I am using Main as the one central thread, ... form subroutines. ... stop pumping out data when the form is unload, ...
    (microsoft.public.vb.general.discussion)
  • Re: Newbie: How to tell where a form has been unloaded
    ... needs to manage data acquistion hw and pump data out to the 2 forms. ... Use the form Unload event. ... I can't just manage the hardware interface in two ... of calls to the interface subroutines. ...
    (microsoft.public.vb.general.discussion)
  • Re: Newbie: How to tell where a form has been unloaded
    ... needs to manage data acquistion hw and pump data out to the 2 forms. ... So I am using Main as the one central thread, ... Use the form Unload event. ... Public WithEvents hw as Interface ...
    (microsoft.public.vb.general.discussion)