Random Ramblings on LabVIEW Design

Community Browser
Labels
cancel
Showing results for 
Search instead for 
Did you mean: 

Groovy Splash Screen

swatts
Active Participant

For a splash screen to get the title GROOVY it needs to have a strange shape, exhibit the right kind of transparency, fade in and have some nice custom progress stuff going on.

I laugh in the face of rectangles!!

So to cure the world of SQUARE software here's how to do it, code will be posted somewhere. Download SplashScreen2013.zip

Tools

You will need Paint.NET

And LibreOffice

And LabVIEW 2013

The LabVIEW bit

You will need to dynamically load the splash screen and then some time after the main program. For a nice fast start up we want to load the main program in the background and then show the front panel.

Startup VI

DynLoadSplashscreen.png1st Dynamically load and run the splash screen
DynLoadMainscreen.pngThen start loading the main program
BringUpMainscreen.pngAfter a bit of a wait bring up the main screen
CleanUpSplashscreen.pngand tidy up the splash screen

Splash Screen

This is the pretty bit, first lets get the graphics. Cut and paste the image into Paint.net and use the magic wand tool.

MagicWandTool.pngThis selects a block of colour that you can delete (make transparent), Delete any thing else that you are going to replace. In this case I deleted the progress, version and link to the website.

Next we load this into our splashscreen VI by Edit>>Import Picture to Clipboard... like thisSplashscreen vi.png

The progress indicator is simply a ring control made from a rotated metafile created in LibreOffice.

ProgressImpress.pngProgress.png

Green Screen Transparency

Now the clever bit is that we do not use the property FP.Transparency for this as this is mostly for fading in and out, we're after a green-screen affect where the background colour is masked.

For this we need to use some Windows functions (I've no idea what the Linux and Mac methods are..sorry).

We need User32.dll>>FindWindowA - gets the window handle

User32.dll>>GetWindowLongA - Retrieves information about the specified window. The function also retrieves the 32-bit (DWORD) value at the specified offset into the extra window memory. We're after extended windows styles..

User32.dll>>SetWindowLongA - Changes an attribute of the specified window. The function also sets the 32-bit (long) value at the specified offset into the extra window memory. The window is a layered window

User32.dll>>SetLayeredWindowAttributes - Sets the opacity and transparency color key of a layered window.

I don't know where I got this from, it certainly wasn't down to my own hard work.

ooohPretty.png

This can be quite easily grabbed and moved about (bit of mouse down event jiggery-pokery, click on button 2 and drag it about).

So now you have no excuse for dull rectangle LabVIEW, we like Wonky

Hugs and Kisses

Steve


Steve


Opportunity to learn from experienced developers / entrepeneurs (Fab,Joerg and Brian amongst them):
DSH Pragmatic Software Development Workshop


Random Ramblings Index
My Profile

Comments