LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.NET Window Creation

I was hoping for feedback on what I've done here.  Is it a bad idea to not dispose of things?  When does LabView free up all of the objects that are created if they aren't disposed of?  Is there a better way of doing anything here?

 

This is pretty much the example from MSDN except for the addition of a necessary dialog action for the OK button, Cancel was also added for fun.

 

I'm doing all of this in the hope that graphics printed with System.Drawing.* will correctly show transparency on a window created with .NET.  With labview there is something wrong with the background color.

0 Kudos
Message 1 of 2
(2,715 Views)

It is certainly a bad idea not to dispose of objects when you are done with them. There is a garbage collector in .NET that goes through and tries to free up memory by closing out unused objects and the like, but if you don't dispose of your form explicitly you will not know when or if the form has been disposed of.

 

According to the Creating Transparent Objects LabVIEW 2015 Help, you cannot change the color of system controls (Including .NET controls) because system controls change appearance depending on which platform you run the VI. These controls appear in the colors you have set up for your system.

 

 

Aaron Douglass
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(2,666 Views)