Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Unload Form

Hi all, :) I tried searching for an equivalent of form unload for VB but from what i could understand i couldn't find anything. In my program i am opening serial ports, etc. and i want in case the user/system does not close the program properly during operation to have an event type structure(for example) in order to close the ports so they can release the resources and be able to run the program normally later on. Is there an equivalent function or way to form unload like in VB for labview? Cheers
0 Kudos
Message 1 of 3
(5,835 Views)
I just noticed i posted my question in the wrong section 🙂 sorry
0 Kudos
Message 2 of 3
(5,833 Views)

Because LabVIEW uses a dataflow approach, you can put all of your cleanup code as one of the last things to execute and it will perform in a similar fashion to the way that VB fires a Form_Unload event.  There are also even structures in LabVIEW to help control this but the standard programming approach is to control when that cleanup occurs through enforcement of dataflow.  You can enforce the order by chaining together error clusters and/or using sequence structures or other methods.

 

And yes, you might get other ideas in the LabVIEW forum.. 🙂

 

Jason

0 Kudos
Message 3 of 3
(5,820 Views)