Example Code

Splash Screen Effect in LabVIEW

The Splash Screen Effect in LabVIEW code is being updated and will be available on the NI Tools Network soon.

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
BetaCommunityCo
Member
Member
on

Splash Screen Effect in LabVIEW

cool~~

engineer27
Member
Member
on

I used a graphic with a transparent background. The splash effect maintained the transparency, showing only the foreground of the graphic on the windows desktop. Very cool, but unexpected. I assumed I would see the gray Labview background behind the graphic.

I'm not sure why it behaves that way, but glad it does.

ijerom
Member
Member
on

thanks Mark

Coooool ~

Rick_K
NI Employee (retired)
on

You should add a screenshot to this listing

Alan_Gilchrist
Member
Member
on

Seems to be some vi's missing.  Show Hide Scrollbars.vi, Read Main Panel Bounds and Origin.vi, Adjsut Panel Bounds Based on Scrollbar visibility.vi, and Read Scrollbar Visibility.vi.

Mark.Ridgley
Member Member
Member
on

Thanks for downloading and also for taking the time to notify me about the missing VIs.

I apologize for the inconvenience.

I've uploaded a new version of the zip file that contains everything plus what you noted was missing. The filename is still "Splash in Main_LabVIEW_2010.zip".

Thanks again,

Mark Ridgley

Joji
NI Employee (retired)
on

Very Cool. One thing I noticed is the with Professional splash screens, they will usuall fade-in and fade-out before the program. Even with this as a an executable it briefly displays the main panel before jumping to the splash screen.

I edited your code with a Fade IN VI and Fade Out VI. I inserted the Fade In VI within the Display Splash Area.vi. By setting the default VI property to 100% transparent, this makes the effect of fading in the Splash screen with getting a "peek" at the VI.  Also, I used a Fade Out and Fade In between the transition between the splash screen and VI. Essentially, anytime you are doing these programmatic moves you are transparent and there is a smooth transition back and forth.

Very cool set of VIs! Thanks for doing this.

Display Splash Area.pngFade In.png

Restore Main VI.png

Fade Out.png

Joji
Alan_Gilchrist
Member
Member
on

Thanks Joji.  Cool addition to a cool effect.

Mark.Ridgley
Member Member
Member
on

Joji,

Thanks for taking the time to review -- and improve -- my example. I'm glad you like it.

I like what you did with the fade VI. It really makes the effect smoother.

If you haven't done so already, you should post your fade VI to the LabVIEW Community.

I had written a fade VI myself, but I didn't think to use it in this example VI. Great thinking! Would you mind if I incorporate your changes into the posted example? Of course I would give you full credit for your great addition!

Thanks again,

Mark Ridgley

B.Settles
Member
Member
on

Joji,

I can't drop your snippets onto my block diagram. I checked, and it works with other snippets. Don't know why yours aren't working. Can you post the code another way?

"All truths are easy to understand once they are discovered; the point is to discover them." -- Galileo Galilei

Vladiator
Member
Member
on

Could not make it work in LV2011. Any instructions on how to set this up?

Vladiator
Member
Member
on

I was looking to Splash screen code for quite some time and coulud not find anything useful until I saw Mark's Splash in Main code posted here. It's quite interesting that NI has not implemented a splash code for 25 years of its first release!

I give 5-star rating for Mark's code that is attached here. Mark and I were communicating offlist and he was working on issues and examples that are now included in the latest code that he attached here.  The examples he wrote are well documented and self explanatory, and it would be quite ueasy to add them to your project. I've tested the code quite extensively on a few projects, and it's working quite well. There is a minor issue with a main window flashing for a few milliseconds before the splash screen shows up, but it's mostly related to how LabVIEW displays the FP.

The fade in/out effects are great and can be included and customized. I highly recommend this code and appreciate Mark's work on this project.

Mark.Ridgley
Member Member
Member
on

Vlad,

I'm glad to hear that you find the Splash in Main code useful and have already successfully used it on several of your projects. Your early success in using the Splash in Main code is evidence that the Splash in Main code is meeting its two primary objectives -- it is easy to implement for LabVIEW users of all skill levels and it works as designed whether the code is executed as a VI or built into an executable.

Thanks for taking the time to work with me to improve this code. I really appreciate it.

Mark Ridgley

Mark.Ridgley
Member Member
Member
on

Vlad,

I've updated the code to address the reports that the main window flashes for a few milliseconds before the splash screen appears. I added a note indicating that this can be corrected by setting the main VI to run transparently. To do this, go to VI Properties >> Window Appearance >> Customize. Ensure that  "Window runs transparently" is checked and set the value to 100%.

Thanks again for your help in working to improve this example code.

Mark Ridgley

Vladiator
Member
Member
on

Mark,

It was nice meeting you at the NI User Group meeting last week, and it was a great presentation! Looks like setting the transparency to 100% solves that flickering effect - great job finding the root cause.I believe you polished it perfectly now!

I can add one thing about this code that I love: If you set fade-in/fade-out effect in the code, not only the splash screen will fade in, but when the user exits the app, the main application will fade out! the effect is very cool, I have not seen any application that does that. If you add this to your custom app, this will be very impressive!

Regards,

-Vlad

Vladiator
Member
Member
on

A couple of comments:

1.  If you use panel resizing and scaling in your main window, then you need to use Mark's EXAMPLE4 and also note that two check boxes of Windows Size VI properties of your Main panel shall be _unchecked_, specifically these options:

- Maintain proportions of window for different monitor resolution

- Scale all objects on front panel as the window resizes.

2. If you change software version on the transparent text control, your need to make sure it persists (Make current value default), Otherwise when you compile the executible, it will still show the previous version. Ideally the transparent text contol could be changed to an indicator that would show the version of the compiled EXE file.

FabiolaDelaCueva
Active Participant Active Participant
Active Participant
on

Mark,

When I try to extract the zip files I get a prompt for password, I skip them all and of course end up with an empty folder. What should I do with the zip file after I download it. I am using LabVIEW 2012.

Thanks,

Fab

For an opportunity to learn from experienced developers / entrepeneurs (Steve, Joerg, and Brian amongst them):
Check out DSH Pragmatic Software Development Workshop!

DQMH Lead Architect * DQMH Trusted Advisor * Certified LabVIEW Architect * Certified LabVIEW Embedded Developer * Certified Professional Instructor * LabVIEW Champion * Code Janitor

Have you been nice to future you?
Mark.Ridgley
Member Member
Member
on

Hey, Fabiola


Thanks for downloading my code. I'm sorry to hear about your difficulties trying to extracting the files.


The fact that you are being prompted for a password is odd because I never put passwords on anything that I upload to the community.


Some users have reported issues with long paths when extracting some of my uploads. Could you try extracting the files to C:\ to see if that corrects the issue?

Otherwise, would you be able to post a screen capture of one of the prompts you are seeing so that I can try to figure out what might be happening here?


Thanks,

Mark

FabiolaDelaCueva
Active Participant Active Participant
Active Participant
on

I was beign lazy and just leaving the default directory name when I right clicked on the zip file and selected "Extract all".  Once I changed the directory name it worked.

Here is the image I was getting, in case someone else has this problem in the future:

Password Needed.PNG

For an opportunity to learn from experienced developers / entrepeneurs (Steve, Joerg, and Brian amongst them):
Check out DSH Pragmatic Software Development Workshop!

DQMH Lead Architect * DQMH Trusted Advisor * Certified LabVIEW Architect * Certified LabVIEW Embedded Developer * Certified Professional Instructor * LabVIEW Champion * Code Janitor

Have you been nice to future you?
FabiolaDelaCueva
Active Participant Active Participant
Active Participant
on

Mark,

This is very nice. Thanks for sharing it with the community.

Regards,

Fab

For an opportunity to learn from experienced developers / entrepeneurs (Steve, Joerg, and Brian amongst them):
Check out DSH Pragmatic Software Development Workshop!

DQMH Lead Architect * DQMH Trusted Advisor * Certified LabVIEW Architect * Certified LabVIEW Embedded Developer * Certified Professional Instructor * LabVIEW Champion * Code Janitor

Have you been nice to future you?
Mark.Ridgley
Member Member
Member
on

Fabiola,

I'm glad that things worked out for you.

Thanks for the feedback - I really appreciate it.

I'm glad you like the code and I hope you find it useful.

Mark

bienieck
Active Participant
Active Participant
on

Firstly, I would like to say - great piece of code, Mark!

Secondly - I think I noticed some kind of annoying bug. When I run example 5 with transparent ring then I can see all picture ring with black background instead transparent, just in blink of the eye. I found that it is probably connected with time gap between changing front panel window state (prperty node) and for loop in last flat sequence frame in Splash in Main - Set Layered Window Attributes.vi. Any idea how to handle it?

Michał Bieńkowski
CLA, CTA

Someone devote his time to help solve your problem? Appreciate it and give kudos. Problem solved? Accept as a solution so that others can find it faster in the future.
Make a contribution to the development of TestStand - vote on TestStand Idea Exchange.
Haiping
Member
Member
on

Mark,

Thanks for sharing! Really cool~

Haiping
Member
Member
on

And, be careful about the vi window properties settings. For example, the minimum window size.

AmitKaria2k
Member
Member
on

Really cool & nice examples !!

Thanks for sharing the code with community

SaranVenkateshS
Active Participant
Active Participant
on

Hi i need to splash screen ..

when booting ..

Ans when Panel closing .

How to select two splash screen.

when i try Ctrl shift K .

FabiolaDelaCueva
Active Participant Active Participant
Active Participant
on

Saran1988,

You can find more about Splash screens here: https://decibel.ni.com/content/blogs/labviewramblings/2013/11/30/groovy-splash-screen

as far as the Ctrl + Shift + K, you can try to put a hidden button on your front panel that has the key navigation set to that combination key.

Also, you might get more responses if you ask your question in the forums, I recommend the NI forums and LAVAG:

http://www.ni.com/white-paper/5056/en/

Good luck.

Regards,

Fab

For an opportunity to learn from experienced developers / entrepeneurs (Steve, Joerg, and Brian amongst them):
Check out DSH Pragmatic Software Development Workshop!

DQMH Lead Architect * DQMH Trusted Advisor * Certified LabVIEW Architect * Certified LabVIEW Embedded Developer * Certified Professional Instructor * LabVIEW Champion * Code Janitor

Have you been nice to future you?
Not applicable
on

Sorry about my OOO msg... deleting it

Contributors