Innovative Posted December 25, 2008 Share Posted December 25, 2008 SplashImageOn displays a image immediately but is it possible to make it fade ? Fade in or out with the image .. Link to comment Share on other sites More sharing options...
TheTex Posted December 25, 2008 Share Posted December 25, 2008 Only way I could come up to do it is using a .gif image to have the animation of fading in/out or planting a .avi in a form and have it load or unload. Link to comment Share on other sites More sharing options...
BrettF Posted December 25, 2008 Share Posted December 25, 2008 Could create your own... This is a rough example...expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GDIPlus.au3> Global $GUI, $hGraphic, $hImage $file = FileOpenDialog("", "", "All (*.*)") $ret = _SplashScreenCreateEx($file) Sleep(5000) _SplashScreenDeleteEx($ret) Func _SplashScreenCreateEx($imagefile, $width = -1, $height = -1) Local $aRet[3] _GDIPlus_Startup() $hImage = _GDIPlus_ImageLoadFromFile($imagefile) If $width = -1 Then $width = _GDIPlus_ImageGetWidth($hImage) EndIf If $height = -1 Then $height = _GDIPlus_ImageGetHeight($hImage) EndIf $GUI = GUICreate("AutoIt Splash Screen Example", $width, $height, Default, Default, $WS_POPUP) $hGraphic = _GDIPlus_GraphicsCreateFromHWND($GUI) GUIRegisterMsg($WM_PAINT, "MY_WM_PAINT") GUISetState() For $i = 0 to 55 Step 1 WinSetTrans($GUI, "", $i) Next $aRet[0] = $GUI $aRet[1] = $hGraphic $aRet[2] = $hImage Return $aRet EndFunc ;==>_SplashScreenCreateEx Func _SplashScreenDeleteEx($hwnd) For $i = 255 to 0 Step -1 WinSetTrans($hwnd[0], "", $i) Next _GDIPlus_GraphicsDispose($hwnd[1]) _GDIPlus_ImageDispose($hwnd[2]) _GDIPlus_Shutdown() GUIDelete($hwnd[0]) EndFunc ;==>_SplashScreenDeleteEx Func MY_WM_PAINT($hwnd, $Msg, $wParam, $lParam) _WinAPI_RedrawWindow($GUI, 0, 0, $RDW_UPDATENOW) _GDIPlus_GraphicsDrawImage($hGraphic, $hImage, 0, 0) _WinAPI_RedrawWindow($GUI, 0, 0, $RDW_VALIDATE) Return $GUI_RUNDEFMSG EndFunc ;==>MY_WM_PAINTAlso check this out: #172805Different way to do the animation...Hope that gives you a starting point. Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Innovative Posted December 25, 2008 Author Share Posted December 25, 2008 (edited) @BrettF I tried that but thats what happen with an full imageIt only displayed the corner of the picture .. It do fades btw. Edited December 25, 2008 by xVivoCity Link to comment Share on other sites More sharing options...
FireFox Posted December 25, 2008 Share Posted December 25, 2008 @xVivoCity ?? #include <WindowsConstants.au3> $pic = FileOpenDialog("Select picture to display", "", "All Picture (*.*)", 1 + 2) $hwnd = GUICreate("", @DesktopWidth - 300, @DesktopHeight - 300, -1, -1, $WS_POPUP) GUICtrlCreatePic($pic, 0, 0, @DesktopWidth - 300, @DesktopHeight - 300) DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00080000);fade-in GUISetState() Sleep(2000);View picture DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00090000);fade-out Exit While 1 Sleep(250) WEnd Link to comment Share on other sites More sharing options...
Innovative Posted December 26, 2008 Author Share Posted December 26, 2008 Thanks FireFox ! Worked , however, .gif files don't animate is it possible to make it animate ? Link to comment Share on other sites More sharing options...
FireFox Posted December 26, 2008 Share Posted December 26, 2008 @xVivoCityLittle search on forum : http://www.autoitscript.com/forum/index.php?showtopic=77179http://www.autoitscript.com/forum/index.php?showtopic=73743 Link to comment Share on other sites More sharing options...
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