PDA

View Full Version : Splash image transparency in Dialog.SplashImage



Superbank
06-19-2009, 04:49 AM
I am launching a splash image by Dialog.SplashImage.

How to obtain a handle of this splash window (probably with WinAPI) and change the transparency of the splash image by WinApi.SetwindowTrans ? :huh

jassing
06-20-2009, 09:01 PM
Splash images "block" code from running.

ie: if you issue
Dialog.SplashImage("MyImage.jpg",300)
Dialog.MessageBox("hi","hi")

the MessageBox won't appear for 5 minutes.

The only way around that would be to launch an exe before your splash image, then display the splash image.

Your other exe (primer file) would simply wait for that window to appear, get it's handle, change the transparancy, and then exit.

I haven't tested this -- but it seems very plausable.

jassing
06-20-2009, 10:29 PM
Using this code:

-- On Startup Code to set the transparency of the splash image

-- Setup the specific variables
local cLogo = "logo.bmp"
local nTransparency = 170;

-- Run the splash screen transparency adjuster tool
File.Run(_TempLaunchFolder.."\\SetSplashTransparancy.exe",SessionVar.Expand("\"%ProductName% Setup\" "..nTransparency.."\""),"",-1,false);

-- Display our splash screen and wait 30 seconds
Dialog.SplashImage(_TempLaunchFolder.."\\"..cLogo, 30, false);

-- Remove the two primer files, they're no longer needed.
File.Delete(_TempLaunchFolder.."\\SetSplashTransparancy.exe");
File.Delete(_TempLaunchFolder.."\\"..cLogo);

and then include your logo and the SetSplashTransparancy.exe as primer files.

ComputerNerd
04-05-2010, 07:38 PM
I am trying to do the same thing superbank is doing only I got lost in your coding jassing. Let me get this straight...

1. I first need to place the SetSplashTransparancy.exe in the startup of my project in the action section. What code is needed for this?

2. Then insert Dialog.SplashImage(_SourceFolder .. "\\AutoPlay\\Images\\splash.jpg", 5, false); in the action section of the startup project.

3. Now what? :huh

All help is appreciated. I would like to get this transparency splash screen going.

ComputerNerd
04-05-2010, 08:11 PM
Alright jassing I put the code...

-- On Startup Code to set the transparency of the splash image

-- Setup the specific variables
local cLogo = "logo.bmp"
local nTransparency = 170;

-- Run the splash screen transparency adjuster tool
File.Run(_TempLaunchFolder.."\\SetSplashTransparancy.exe",SessionVar.Expand("\"%ProductName% Setup\" "..nTransparency.."\""),"",-1,false);

-- Display our splash screen and wait 30 seconds
Dialog.SplashImage(_TempLaunchFolder.."\\"..cLogo, 30, false);

-- Remove the two primer files, they're no longer needed.
File.Delete(_TempLaunchFolder.."\\SetSplashTransparancy.exe");
File.Delete(_TempLaunchFolder.."\\"..cLogo);

in the startup project action section. Where do I put the image I am using for the splash screen and where do I put SetSplashTransparancy.exe? Do I need to set certain directories in your code in order to see the image and the .exe? Is there any modification I need to change in your code?

After doing the above I get the following error window upon load...

On Startup, line 8: attempt to concatenate global' _TempLaunchFolder'(a nil value)

Any ideas? :huh

jassing
04-05-2010, 10:24 PM
Yea, you're using AMS but using code specific to SUF...


(Post is purely for historical purposes so others searching will learn from....)