Jump to content
Son zamanlarda artan kullanıcı hesap hırsızlıkları sebebiyle tüm kullanıcılara şifre sıfırlama maili gönderilmiştir. Lütfen güveli şifreler seçiniz. Mevcut e-mail adresinize erişemiyorsanız, en aşağıdaki destek linkinden bize ulaşınız. ×

Gif Animation Udf


blackman12

Recommended Posts

Özellikleri:

AutoIT'te eksik olarak bulunan GIF desteğini tamamlar.Bu UDF ile GIF resimlere tam anlamıyla hükmedebilirsiniz.

- Arayüz içerisinde GIF oluşturabilirsiniz

Fonksiyon adı...........: _GUICtrlCreateGIF
Kullanımı..................: _GUICtrlCreateGIF($gifadı, $soldan, $yukarıdan, ByRef $aGIFArrayOfIconHandles, ByRef $hGIFThread, ByRef $iTransparency, ByRef $pCurrentFrame)
Örnek......................: _GUICtrlCreateGIF("c:\deneme.gif", 10, 20, $aGIFArrayOfIconHandles, $hGIFThread, $iTransparency, $pCurrentFrame)
Dönüş Değerleri........:
-Başarılıysa: Oluşturulan GIF'in ControlID'si ve @error = 0
-Başarısızsa: 0 @error değeri 1 iseGDIPlus ile ilgili sorun 2 ise animasyon hatası[/CODE]

- Durdurabilir

- Devam ettirebilir

- Yenileyebilir

- Genişlik, Yükseklik değerlerini alabilir

- Arayüzden silebilirsiniz.

- Diğer yapabildikleri için UDF'nin açıklama bölümünü okuyarak yardım alabilirsiniz.

Örnek:

[CODE]#include <WindowsConstants.au3>
#include "GIFAnimation.au3"

Opt("MustDeclareVars", 1)


Global $hGui = GUICreate("GIF Animation", 500, 500, -1, -1, $WS_OVERLAPPEDWINDOW)

Global $sFile = FileOpenDialog("Choose gif", "", "(*.gif)", -1, "", $hGui)
If @error Then Exit

Global $aGIFArrayOfIconHandles
Global $hGIFThread
Global $iGIFTransparent
Global $tFrameCurrent

Global $hGIF = _GUICtrlCreateGIF($sFile, 10, 10, $aGIFArrayOfIconHandles, $hGIFThread, $iGIFTransparent, $tFrameCurrent)
GUICtrlSetTip($hGIF, "GIF")


Global $hButton = GUICtrlCreateButton("Stop animation", 50, 450, 100, 25)
Global $hButton1 = GUICtrlCreateButton("Delete GIF", 200, 450, 100, 25)
Global $hButton2 = GUICtrlCreateButton("Open GIF", 350, 450, 100, 25)


GUIRegisterMsg(15, "_Refresh"); WM_PAINT; don't forget this. It's needed only for non-transparent gifs though, but still.

Global $iPlay = 1

GUISetState()



While 1

Switch GUIGetMsg()
Case - 3
Exit
Case $hButton
If $iPlay Then
If _StopGIFAnimation($hGIFThread) Then
$iPlay = 0
GUICtrlSetData($hButton, "Resume animation")
EndIf
Else
If _ResumeGIFAnimation($hGIFThread) Then
$iPlay = 1
GUICtrlSetData($hButton, "Stop animation")
EndIf
EndIf
Case $hButton1
_GUICtrlDeleteGIF($hGIF, $aGIFArrayOfIconHandles, $hGIFThread, $tFrameCurrent)
Case $hButton2
$sFile = FileOpenDialog("Choose gif", "", "(*.gif)", -1, "", $hGui)
If Not @error Then
_GUICtrlDeleteGIF($hGIF, $aGIFArrayOfIconHandles, $hGIFThread, $tFrameCurrent); if already there
$hGIF = _GUICtrlCreateGIF($sFile, 10, 10, $aGIFArrayOfIconHandles, $hGIFThread, $iGIFTransparent, $tFrameCurrent)
GUICtrlSetTip($hGIF, "GIF")
$iPlay = 1
GUICtrlSetData($hButton, "Stop animation")
EndIf
EndSwitch

WEnd




Func _Refresh($hWnd, $iMsg, $wParam, $lParam)

#forceref $hWnd, $iMsg, $wParam, $lParam

_RefreshGIF($hGIF, $aGIFArrayOfIconHandles, $hGIFThread, $iGIFTransparent, $tFrameCurrent)

EndFunc;==>_Refresh[/CODE]

Orjinal Konu:

[CODE]http://www.autoitscript.com/forum/index.php?showtopic=96132[/CODE]

Gif Animation UDF:

[CODE]http://www.mediafire.com/?q54oiqis5oo8a5t
http://www.4shared.com/file/Jgh13jEz/GIFAnimation.html[/CODE]

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...