Hi
Gibt es vielleicht schon irgend eine UDF, die Animierte GIFs in einer GUI zulässt?
Hab schon probiert die GIFs in AVI umzuwandeln aber da kommt nur Schrott raus.
Hi
Gibt es vielleicht schon irgend eine UDF, die Animierte GIFs in einer GUI zulässt?
Hab schon probiert die GIFs in AVI umzuwandeln aber da kommt nur Schrott raus.
Das geht wahrscheinlich nur über den Umweg über einen eingebetteten IE!
[autoit]#include <GUIConstants.au3>
#include <ie.au3>
$oIE = _IECreateEmbedded()
[/autoit][autoit][/autoit][autoit]GUICreate ("My GUI Animation",300,300)
$ani1 = GUICtrlCreateObj ($oIE,30, 30, 250,250)
GUISetState( )
_IENavigate($oIE,@ScriptDir & "\antenne.gif")
; Run the GUI until the dialog is closed
While 1
$msg = GUIGetMsg()
Select
case $msg = $GUI_EVENT_CLOSE
ExitLoop
EndSelect
Wend
Hi,
#include-once
;===============================================================================
;
; Function Name: _GUICtrlCreateGIF()
; Description: Create an Animated GIF control
; Parameter(s): $gif [required] path and filename of the animated GIF
; $x [optional] x pos of the top-left corner
; $y [optional] y pos of the top-left corner
; $border [optional] 0 = no border
; any other = sunken border
; Requirement(s): #include <IE.au3>
; Return Value(s):
; controlID of the control created
; Author(s): elgabionline, gafrost, Ed_Maximized
;
;===============================================================================
Func _GUICtrlCreateGIF($gif,$x=0,$y=0,$border=0)
Local $pwidth,$pheight,$oIE,$GUIActiveX
_GetGifPixWidth_Height($gif, $pwidth, $pheight)
$oIE = ObjCreate("Shell.Explorer.2")
$GUIActiveX = GUICtrlCreateObj($oIE, $x, $y, $pwidth, $pheight)
$oIE.navigate ("about:blank")
While _IEPropertyGet($oIE, "busy")
Sleep(100)
WEnd
$oIE.document.body.background = $gif
$oIE.document.body.scroll = "no"
if $border=0 then $oIE.document.body.style.border = "0px"
Return $oIE
EndFunc
;===============================================================================
;
; Function Name: _GUICtrlStopGIF()
; Description: stop an Animated GIF control created with _GUICtrlCreateGIF()
; Parameter(s): $Control [required] controlID of the control returned by _GUICtrlCreateGIF()
;
; Requirement(s): #include <IE.au3>
; Return Value(s):
; none
; Author(s): lod3n, Ed_Maximized
;
;===============================================================================
Func _GUICtrlStopGIF($Control)
_IEAction ($Control, "stop" ) ; stop
EndFunc
;===============================================================================
;
; Function Name: _GUICtrlResumeGIF()
; Description: resume an Animated GIF control created with _GUICtrlCreateGIF()
; Parameter(s): $Control [required] controlID of the control returned by _GUICtrlCreateGIF()
;
; Requirement(s): #include <IE.au3>
; Return Value(s):
; none
; Author(s): lod3n, Ed_Maximized
;
;===============================================================================
Func _GUICtrlResumeGIF($Control)
$Control.document.body.background = $Control.document.body.background ;resume
EndFunc
;===============================================================================
;
; Function Name: _GetGifPixWidth_Height()
; Description: return the size of a GIF image in pixels
; Parameter(s): $s_gif [required] path and filename of the animated GIF
;
; Requirement(s): #include <IE.au3>
; Return Value(s):
; $pwidth = width of the GIF in pixels
; $pheight = height of the GIF in pixels
; Author(s): gafrost
;
;===============================================================================
Func _GetGifPixWidth_Height($s_gif, ByRef $pwidth, ByRef $pheight)
If FileGetSize($s_gif) > 9 Then
Local $sizes = FileRead($s_gif, 10)
ConsoleWrite("Gif version: " & StringMid($sizes, 1, 6) & @LF)
$pwidth = Asc(StringMid($sizes, 8, 1)) * 256 + Asc(StringMid($sizes, 7, 1))
$pheight = Asc(StringMid($sizes, 10, 1)) * 256 + Asc(StringMid($sizes, 9, 1))
ConsoleWrite($pwidth & " x " & $pheight & @LF)
EndIf
EndFunc ;==>_GetGifPixWidth_Height
So long,
Mega
Super danke
Klappt beides.
Hi Leute,
Cool so eine Funktion habe ich schonmal gesucht leider net gefunden.
@th.meger
Gibt es denn eine UDF-Sammlung wo alle UDFs aufgelistet sind?
MfG
Der_Doc
Hi,
genau aus diesem Grund habe ich den Thread ja eröffnet.
So long,
Mega
Hi,
OK OK ich habe es doch net gesehen. Thx nochmal für den Hinweis
MfG
Der_Doc