Sign in to follow this  
Followers 0
PhilipG

SplashImageOn ()

7 posts in this topic

Short and simple question: Is there anyway to do what SplashImageOn () does but without windows borders?

Share this post


Link to post
Share on other sites



I found some functions but i would like to use it with a partial transperent gif file

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

---

Edited by playlet

Share this post


Link to post
Share on other sites

I think this topic will help you.

SpLash


[size="5"] [/size]

Share this post


Link to post
Share on other sites

Maybe you can use something like this.

You need a 24 bits png file.

#include <GDIPlus.au3>
#include <WindowsConstants.au3>

_GDIPlus_Startup()

$hSplashlogo = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\logo.png")
$SplashGUI = GUICreate("", _GDIPlus_ImageGetWidth($hSplashlogo), _GDIPlus_ImageGetHeight($hSplashlogo), @DesktopWidth/2, @DesktopHeight/2, $WS_POPUP, $WS_EX_LAYERED, $DS_MODALFRAME)
_SetBitmap($SplashGUI, $hSplashlogo, 0, _GDIPlus_ImageGetWidth($hSplashlogo), _GDIPlus_ImageGetHeight($hSplashlogo))
GUISetState()
WinSetOnTop($SplashGUI, "", 1)

For $i = 0 To 255 Step 2
    _SetBitmap($SplashGUI, $hSplashlogo, $i, _GDIPlus_ImageGetWidth($hSplashlogo), _GDIPlus_ImageGetHeight($hSplashlogo))
Next

sleep (3000)

For $i = 255 To 0 Step -2
    _SetBitmap($SplashGUI, $hSplashlogo, $i, _GDIPlus_ImageGetWidth($hSplashlogo), _GDIPlus_ImageGetHeight($hSplashlogo))
Next
_GDIPlus_ImageDispose($hSplashlogo)
GUIDelete($SplashGUI)
_GDIPlus_Shutdown()

Func _SetBitmap($hGUI, $hImage, $iOpacity, $n_width = 200, $n_height = 200)
    Local $hScrDC, $hMemDC, $hBitmap, $hOld, $pSize, $tSize, $pSource, $tSource, $pBlend, $tBlend

    $hScrDC = _WinAPI_GetDC(0)
    $hMemDC = _WinAPI_CreateCompatibleDC($hScrDC)
    $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage)
    $hOld = _WinAPI_SelectObject($hMemDC, $hBitmap)
    $tSize = DllStructCreate($tagSIZE)
    $pSize = DllStructGetPtr($tSize)
    DllStructSetData($tSize, "X", $n_width)
    DllStructSetData($tSize, "Y", $n_height)
    $tSource = DllStructCreate($tagPOINT)
    $pSource = DllStructGetPtr($tSource)
    $tBlend = DllStructCreate($tagBLENDFUNCTION)
    $pBlend = DllStructGetPtr($tBlend)
    DllStructSetData($tBlend, "Alpha", $iOpacity)
    DllStructSetData($tBlend, "Format", 1)
    _WinAPI_UpdateLayeredWindow($hGUI, $hScrDC, 0, $pSize, $hMemDC, $pSource, 0, $pBlend, $ULW_ALPHA)
    _WinAPI_ReleaseDC(0, $hScrDC)
    _WinAPI_SelectObject($hMemDC, $hOld)
    _WinAPI_DeleteObject($hBitmap)
    _WinAPI_DeleteDC($hMemDC)
EndFunc

Share this post


Link to post
Share on other sites

sweet Thats perfect! Thanks!

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

---

Edited by playlet

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0