LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

picture fade out

Hi all!

 

I would like to make picture at start of application to fade out (same size as front panel) in order to get menu which was previously in the back ground of the same picture. Can someone please give me an idea for that?

 

Thanks,

Vedran

0 Kudos
Message 1 of 28
(4,241 Views)

Vedran,

 

there are many options, but all condense down to: transparency. 

I think the easiest method is to use a seperate VI (splash screen) and use the Front Panel Window:Run VI Transparently Property to fade the whole VI frontpanel out.

This might get a bit tricky for positioning under different resolutions of the systems the application should run on, but still quite easy to solve.

 

hope this helps,

Norbert 

 

PS: Please note that when faded out, the splash screen VI has to be quit. 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 2 of 28
(4,228 Views)
If you want a splash screen to fade away, and have the real main VI appear,
it is a lot easier.

Make a VI with the picture. Make it floating, or modal. Also, set the
transparancy (in VI Properties>window appearance) to 0%, but make sure the
value is tagged. You can make the splash screen the same size as the caller
(main) vi with property nodes.

Now, in a while loop, simply put 0 to 100 in the Panel>Transparency property
of the VI. Put a 10 ms wait in it, and the front panel of the VI will
dissapear in about 1 second.


If you want to do it with a picture control in the same VI, it is a bit more
difficult.

First you need to get a picture of the VI with a VI method. Get it's 2D
array of pixels with "Unflatten Image". Do the same with the splash picture.

Now, in a dubble for loop for each pixel, alpha blend the to pixels of the
two images using out = a * x + b * ( 1 - x ), where x is the iteration (0 -
1), and a and b are the pixels from picture A and picture B... If both
pictures are the same size, it is easier.

You can optimize this, but the idea is the same. You don't have to use the
two for loops, and you don't even have to use the unflatten image, but it is
easier to get started.

When done, hide the picture control with a property node.

Regards,

Wiebe.


Message 3 of 28
(4,224 Views)

Thank you guys very much. I'll give it a try, particulary the idea with pic in other VI with tagged transparency for loop control.

 

Thanks one again, regards

Vedran

0 Kudos
Message 4 of 28
(4,220 Views)

As i'm thinking of adding a splash screen to our project i tried the ideas mentioned and found a bug.

 

Removing Title bar slow the transition by a factor 4!

 

With 20 ms loops i get a beutiful 2 sec transition on my modal application with 0% tranparacy (custom setting), but removing the Show Title bar makes it a ~8 sec transition, any ideas?

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 28
(4,213 Views)
I can't reproduce it in LV 8.5.1.

What version are you using?

Regards,

Wiebe.


0 Kudos
Message 6 of 28
(4,190 Views)
I'm using LabVIEW 8.2
G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 7 of 28
(4,174 Views)

It works properly in 8.2.1 as well. Try running this in 8.2.

 

Regards,

 

Wiebe.

0 Kudos
Message 8 of 28
(4,165 Views)

Based on the advice from Wiebe I made my splash screen fade out using transparency.

 

Oddly enough, on a batch of PCs that are clones of each other (identical HW, with the OS imaged from a single source) it fades out at different speeds. Some run far slower than the others, and I have no idea why!

0 Kudos
Message 9 of 28
(4,155 Views)

I just tried the 8.2.1 you posted and it worked fine ... for 15 secs 🙂

 

I noticed my splash is alot bigger, so i copied your picture 3 times and tried it again, and most of the behaviour is back.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 10 of 28
(4,135 Views)