10-11-2012 10:35 AM
Try running the attached vi - you'll have to step through the code to see the effect. The window behaviour is set to "Modal" and transparent (100%) in the VI properties.
When you run the vi, the FP is immediately displayed, despite transparency being set to 100%. If you then set to window behaviour to "Default", it behaves as expected.
Can anyone explain this, or is it a LV bug? (I'm currently using 2011)
10-11-2012 10:39 AM
I didn't try to run to the code, but I can think of one obvious reason for this code not to work - if you have a transparent modal window, your program will be stuck unless you happen to have keyboard navigation available. It's possible there was code put into place to prevent this combo.
10-11-2012 10:45 AM
That kind of makes sense, but I'd rather be in control to be honest.
The real application is a splash screen that fades in from transparent. A splash screen needs to be modal really. What I actually get currently is a splash screen that flashes up once very quickly, then fades in from transparent.I could bodge it by giving it default behaviour to start with, then change to modal once it's transparent I suppose.
But I still think it's a bug!
J
10-11-2012 10:53 AM - edited 10-11-2012 10:57 AM
@Tournifreak wrote:
Try running the attached vi - you'll have to step through the code to see the effect. The window behaviour is set to "Modal" and transparent (100%) in the VI properties.
When you run the vi, the FP is immediately displayed, despite transparency being set to 100%. If you then set to window behaviour to "Default", it behaves as expected.
Can anyone explain this, or is it a LV bug? (I'm currently using 2011)
Not really a bug but more of an "excpected behavior" that can sometimes be annoying.
When you load the vi FP into memory (since the VI property Window behavior is "Modal" the FP must get loaded) it is displayed until the vi actually starts running. A brief flicker of flops while windows gets around to re-painting the pane when the transparancy settings are requested to be changed by LabVIEW. (Clear?)
You can avoid this from the caller by using a wait until the dialog vi's state is "running" and then use the FP open method.
BUT a 100% transparent modal vi is a fairly dangerous beast. (Or a horrible joke to play on a coworker)
You could try Mark Ridgley's Splash in Main method to combine your fade-in effect with one fell swoop.