PhilipG Posted January 4, 2010 Posted January 4, 2010 Short and simple question: Is there anyway to do what SplashImageOn () does but without windows borders?
PhilipG Posted January 4, 2010 Author Posted January 4, 2010 I found some functions but i would like to use it with a partial transperent gif file
Fire Posted January 5, 2010 Posted January 5, 2010 I think this topic will help you.SpLash [size="5"] [/size]
nend Posted January 6, 2010 Posted January 6, 2010 Maybe you can use something like this. You need a 24 bits png file. expandcollapse popup#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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now