![]() ![]() Pass GIF File path/name _GUICtrlCreateGIF ( "Some.gif", "", 10, 10 ) Binary data _GUICtrlCreateGIF ( $bGIF, "", 10, 10, ) PE Resource (file GIF.dll, Type: GIF, Name: 4) _GUICtrlCreateGIF ( "GIF.dll", "GIF 4", 10, 10, 100, 120 ) PE Resource (file Type: RES, Name: BLAH, Language: 1033) _GUICtrlCreateGIF (, "RES BLAH 1033", 10, 10 ) PE Resource (file "explorer.exe", Type: 2, Name: 6801) _GUICtrlCreateGIF ( "explorer.exe", "2 6801", 10, 10 ) <- BITMAP PE Resource (file Type: RC_DATA, Name: PNG) _GUICtrlCreateGIF (, "10 PNG", 10, 10 ) GIF string _GUICtrlCreateGIF ( FileRead ( "Some.gif" ), "", 10, 10 ) ![]() Will display Images that are passed as binary, resource identifiers, strings, file names. Word or two about main function, _GUICtrlCreateGIF(). ![]() So, download, open ZIP, grab folder inside and place it where you want. Some examples work without classic download. GIF files are downloaded automatically if some example script needs it. Expand collapse popup #include #include #include "3" Opt ( "MustDeclareVars", 1 ) Start by choosing GIF to display Global $sFile = FileOpenDialog ( "Choose Image", "", "(*.gif *.png *.jpg *.tiff *.bmp *.jpeg)", - 1, "" ) If Then Exit Make GUI Global $hGui = GUICreate ( "GIF Animation", 500, 500, - 1, - 1, $WS_OVERLAPPEDWINDOW ) Add some buttons Global $hButton = GUICtrlCreateButton ( "&Pause animation", 50, 450, 100, 25 ) Global $hButton1 = GUICtrlCreateButton ( "&Delete Control", 200, 450, 100, 25 ) Global $hButton2 = GUICtrlCreateButton ( "&Open Image", 350, 450, 100, 25 ) Make GIF Control Global $hGIF = _GUICtrlCreateGIF ( $sFile, "", 10, 10 ) If Then GUICtrlSetState ( $hButton, $GUI_DISABLE ) GUICtrlSetTip ( $hGIF, "Image" ) Additional processing of some windows messages (for example) GUIRegisterMsg ( 133, "_Refresh" ) WM_NCPAINT GUIRegisterMsg ( 15, "_ValidateGIFs" ) WM_PAINT Global $iPlay = 1 Show it GUISetState ( ) Loop till end While 1 Switch GUIGetMsg ( ) Case - 3 Exit Case $hButton If $iPlay Then If _GIF _PauseAnimation ( $hGIF ) Then $iPlay = 0 GUICtrlSetData ( $hButton, "Resume animation" ) EndIf Else If _GIF _ResumeAnimation ( $hGIF ) Then $iPlay = 1 GUICtrlSetData ( $hButton, "Pause animation" ) EndIf EndIf Case $hButton1 _GIF _DeleteGIF ( $hGIF ) Case $hButton2 $sFile = FileOpenDialog ( "Choose gif", "", "(*.gif *.png *.jpg *.tiff *.bmp *.jpeg)", - 1, "", $hGui ) If Not Then _GIF _DeleteGIF ( $hGIF ) delete previous $hGIF = _GUICtrlCreateGIF ( $sFile, "", 10, 10 ) If Then GUICtrlSetState ( $hButton, $GUI_DISABLE ) Else GUICtrlSetState ( $hButton, $GUI_ENABLE ) EndIf GUICtrlSetTip ( $hGIF, "Image" ) $iPlay = 1 GUICtrlSetData ( $hButton, "Pause animation" ) EndIf EndSwitch WEnd Func _Refresh ( $hWnd, $iMsg, $wParam, $lParam ) #forceref $hWnd, $iMsg, $wParam, $lParam _GIF _RefreshGIF ( $hGIF ) EndFunc =>_Refresh Func _ValidateGIFs ( $hWnd, $iMsg, $wParam, $lParam ) #forceref $hWnd, $iMsg, $wParam, $lParam _GIF _ValidateGIF ( $hGIF ) EndFunc =>_ValidateGIFsÄownload from here if you want to impress chicks: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |