BSHARK Posted September 26, 2010 Share Posted September 26, 2010 (edited) Hello every body can any one tell me whats wrong in this code i try to make a "please wait" animated gif like splash screen ... the problem is when i compile the image in the same exe file no image appears i think the error is in this line _ResourceSetImageToCtrl($obj.filename, "TEST_GIF_3") and how i can compile the gif89.dll file .. i think if i compile it this line should be changed FileCopy ("gif89.dll", "C:\Windows\system32",1) my entire code #NoTrayIcon #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Res_File_Add=image3.GIF, rt_rcdata, TEST_GIF_3 #AutoIt3Wrapper_Res_File_Add=image2.GIF, rt_rcdata, TEST_GIF_2 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> #include "resources.au3" FileCopy ("gif89.dll", "C:\Windows\system32",1) Runwait ("REGSVR32 /S gif89.dll") $HWnd = GUICreate("GIFanime", 172, 62, -1, -1, $WS_POPUP,$WS_EX_LAYERED) GUICtrlCreatePic("",-1,-1, 172, 62, $SS_SUNKEN) GUISetState(@SW_SHOW) $obj = ObjCreate("Gif89.Gif89.1") GUICtrlCreateObj( $obj, 0, 0 , 172, 62) _ResourceSetImageToCtrl($obj.filename, "TEST_GIF_3") $PID = Run("Setup.exe /S") ProcessWaitClose($PID) $HWnd = GUICreate("GIFanime", 172, 62, -1, -1, $WS_POPUP,$WS_EX_LAYERED) GUICtrlCreatePic("",-1,-1, 172, 62, $SS_SUNKEN) GUISetState() $obj = ObjCreate("Gif89.Gif89.1") GUICtrlCreateObj( $obj, 0, 0 , 172, 62) _ResourceSetImageToCtrl($obj.filename, "TEST_GIF_3") Sleep (2000) exit Edited September 26, 2010 by BSHARK Link to comment Share on other sites More sharing options...
BSHARK Posted September 28, 2010 Author Share Posted September 28, 2010 can any one help me please ... is it that hard to solve it ? Link to comment Share on other sites More sharing options...
BSHARK Posted September 28, 2010 Author Share Posted September 28, 2010 i found a better way to make an animated gif splash screen here's the code #AutoIt3Wrapper_Au3Check_Parameters=-w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #NoTrayIcon ;.......script written by trancexx (trancexx at yahoo dot com) #include <WindowsConstants.au3> #include "GIFAnimation.au3" Global $sFile = @scriptDir & "\splash1.gif" Global $aGIFDimension = _GIF_GetDimension($sFile) Global $hGui = GUICreate("GIF Animation", $aGIFDimension[0], $aGIFDimension[1], -1, -1, $WS_POPUP, $WS_EX_TOPMOST) Global $pGIF Global $hGIF = _GUICtrlCreateGIF($sFile, "", 10, 10, $pGIF) GUIRegisterMsg(15, "_Refresh"); WM_PAINT GUICtrlSetPos($hGIF, 0, 0) GUISetState() $PID = Run("Setup.exe /S") ProcessWaitClose($PID) Global $sFile = @scriptDir & "\Splash2.gif" Global $aGIFDimension = _GIF_GetDimension($sFile) Global $hGui = GUICreate("GIF Animation", $aGIFDimension[0], $aGIFDimension[1], -1, -1, $WS_POPUP, $WS_EX_TOPMOST) Global $pGIF Global $hGIF = _GUICtrlCreateGIF($sFile, "", 10, 10, $pGIF) GUIRegisterMsg(15, "_Refresh"); WM_PAINT GUICtrlSetPos($hGIF, 0, 0) GUISetState() Sleep (2000) the problem is how to add or compile the gif files into the exe ? Link to comment Share on other sites More sharing options...
UEZ Posted September 28, 2010 Share Posted September 28, 2010 (edited) Have a look here: #831851Maybe you can use this method to embed images into your script to display images. Br,UEZ Edited September 28, 2010 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
BSHARK Posted September 28, 2010 Author Share Posted September 28, 2010 thanks a lot ... 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