Jump to content

SplashImage using animated GIF


slayerz
 Share

Recommended Posts

Hi everyone...this is my very first example, so help me if I'm wrong.

Last Friday, I had asked Zedna if it's possible to make splash image load

from .dll file and thanks again to Zedna for the useful link , and also

for the author of Resources.au3

Global Const $RT_CURSOR = 1
Global Const $RT_BITMAP = 2
Global Const $RT_ICON = 3
Global Const $RT_MENU = 4
Global Const $RT_DIALOG = 5
Global Const $RT_STRING = 6
Global Const $RT_FONTDIR = 7
Global Const $RT_FONT = 8
Global Const $RT_ACCELERATOR = 9
Global Const $RT_RCDATA = 10
Global Const $RT_MESSAGETABLE = 11
Global Const $RT_GROUP_CURSOR = 12
Global Const $RT_GROUP_ICON = 14
Global Const $RT_VERSION = 16
Global Const $RT_DLGINCLUDE = 17
Global Const $RT_PLUGPLAY = 19
Global Const $RT_VXD = 20
Global Const $RT_ANICURSOR = 21
Global Const $RT_ANIICON = 22
Global Const $RT_HTML = 23
Global Const $RT_MANIFEST = 24oÝ÷ Ù*®­ç±jjez¯zx^­è­ßÛ)¢Ë"nW­¢f¤zÊejÈb¨~º&vY_WºØ­ßÛ(¢¶â¶f©jwHÁ©í¶¬xóF~æjÔázÚârH¬²)©â,j÷­ãÍø¥y«v«Éø¥y©ÝºÈ§¬¢êÜx¢×«!§]¶v«Éø¥y«6­ig¥Øb²+-ç±jjey«­¢+ØìQ¡¥Ì¥Ì¸áµÁ±½ÍÁ±Í ¥µ¡É±Á½ÁÕÀ¤±½É½´¹±°¥±(ì
½µÁÑ¥±Ý¥Ñ Ñ¡±ÑÍÐÙÉÍ¥½¸Ì¸È¸ÄȸÄ(ìäͱåÉè((¥¹±Õ±ÐíU%
½¹ÍѹÑ̹ÔÌÐì(¥¹±Õ±Ðí]¥¹½ÝÍ
½¹ÍѹÑ̹ÔÌÐì(¥¹±Õ±ÐíMÑÑ¥
½¹ÍѹÑ̹ÔÌÐì(¥¹±Õ±ÐíIͽÕÉ̹ÔÌÐì()±½°
½¹ÍÐÀÌØí]5}1    UQQ=9=]8ôÁàÀÈÀÄ((ÀÌØí!]¹ôU%
ÉÑ ÅÕ½ÐíMÁ±Í UÍ¥¹A9ɽ´10ÅÕ½Ðì°ØÄÔ°ÐÔÀ°´Ä°´Ä°ÀÌØí]M}A=AUA]%9=°ÀÌØí]M}a}Q==1]%9=¤(ÀÌØí%ôU%
Ñɱ
ÉÑA¥ ÅÕ½ÐìÅÕ½Ðì°´Ä°´Ä°ÌÔÀ°ÈÀÀ°ÀÌØíMM}MU9-8¤)}IͽÕÉMÑ%µQ½
ÑÉ° ÀÌØí%°ÅÕ½ÐìÄÅÕ½Ðì°ÄÀ°MÉ¥ÁѥȵÀìÅÕ½ÐìÀäÈíQMP¹±°ÅÕ½Ðì¤$ìÄÀ°$Ìäí´ÕÍ¥¹I
Q)U%I¥ÍÑÉ5Í ÀÌØí]5}1   UQQ=9=]8°ÅÕ½Ðí]5}1    UQQ=9=]8ÅÕ½Ðì¤)U%MÑMÑÑ ¤)M±À ÔÀÀÀ¤ì!½Ü±½¹å½ÕÈÍÁ±Í Ý¥±°¥ÍÁ±å()Õ¹]5}1   UQQ=9=]8 ÀÌØí¡]¹°ÀÌØí¥5Í°ÀÌØíÝAÉ´°ÀÌØí±AÉ´¤(% ¥Ñ9¡]¥¹ÑMÑÑ ÀÌØí¡]¹¤°ÌȤQ¡¸IÑÕɸÀÌØíU%}IU95M(±±
±° ÅÕ½ÐíÕÍÈÌȹ±°ÅÕ½Ðì°ÅÕ½Ðí±½¹ÅÕ½Ðì°ÅÕ½ÐíM¹5ÍÍÅÕ½Ðì°ÅÕ½Ðí¡Ý¹ÅÕ½Ðì°ÀÌØí¡]¹°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÀÌØí]5}MeM
=559°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÁáÀÀä°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°À¤)¹Õ¹

You can download the demo file below :

DOWNLOAD Splash Using DLL

DOWNLOAD Splash Using GIF

Thats all from me... :)

Edited by slayerz

AUTOIT[sup] I'm lovin' it![/sup]

Link to comment
Share on other sites

BTW, in TEST.dll, I'd included the WAV file and you can use ResHacker to play it.

In example given by ProgAndy :

; play WAV from resource (sync/async)
_ResourcePlaySound("TEST_WAV_1")
_ResourcePlaySound("TEST_WAV_1", $SND_ASYNC)

This is example of how to load WAV file from internal resource, but is there any way to

load it from external resource such as TEST.dll?

AUTOIT[sup] I'm lovin' it![/sup]

Link to comment
Share on other sites

This is the explanation bout the 1st post, I can't add it to the 1st post because the code is corrupted, so I'll juz add a new reply.

Long, long time ago (last year maybe) I wondered if I can use animated GIF in my GUI for splash image, for the background and etc to make my GUI look alive..but due to some restriction in Autoit :

GUICtrlCreatePic

Creates a Picture control for the GUI.

GUICtrlCreatePic ( filename, left, top [, width [, height [, style [, exStyle]]]] )

filename of the picture to be loaded : supported types BMP, JPG, GIF(but not animated).

Until then, I found the example of kjactive and all credit goes to him (bcoz I'm only show you the example of how to make splash image with animated GIF

But first, your PC must have this dll file "Gif89.dll"

1.Copy the Gif89.dll into system32 directory

2.Run regsvr32.exe gif89.dll to install the library

3.Run regsvr32.exe /u gif89.dll to uninstall library

; This is an example of splash image (draggable popup) using animated GIF
; Compatible with the latest version 3.2.12.1
; Credit to kjactive for the sample
; by slayerz

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>

Global Const $WM_LBUTTONDOWN = 0x0201
$banner = @ScriptDir & "\banner.gif" ; your animated GIF file, change this

$HWnd = GUICreate("Animated GIF", 250, 250, -1, -1, $WS_POPUPWINDOW,$WS_EX_TOOLWINDOW)
GUICtrlCreatePic("",-1,-1,350,200,$SS_SUNKEN)

GUIRegisterMsg($WM_LBUTTONDOWN, "WM_LBUTTONDOWN")
GUISetState()

$obj = ObjCreate("Gif89.Gif89.1")
GUICtrlCreateObj( $obj, 0, 0 ,  250, 250)
$obj.filename = $banner

Sleep(5000) ; How long your splash will be displayed
$obj = 0

Func WM_LBUTTONDOWN($hWnd, $iMsg, $wParam, $lParam)
    If BitAND(WinGetState($hWnd), 32) Then Return $GUI_RUNDEFMSG
    DllCall("user32.dll", "long", "SendMessage", "hwnd", $hWnd, "int", $WM_SYSCOMMAND, "int", 0xF009, "int", 0)
EndFunc
Edited by slayerz

AUTOIT[sup] I'm lovin' it![/sup]

Link to comment
Share on other sites

Hi!

An example who run (on screen):

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>

$HWnd = GUICreate("GIFanime", 105, 130, -110, -1, $WS_POPUP,$WS_EX_LAYERED)
GUICtrlCreatePic("",-1,-1, 105, 130, $SS_SUNKEN)
GUISetState()
$obj = ObjCreate("Gif89.Gif89.1")
GUICtrlCreateObj( $obj, 0, 0 , 105, 130)
$obj.filename = @ScriptDir & "\vaca19.gif" 

$n=-105
while $n<@DesktopWidth+105
    $n += 2
    WinMove($HWnd,"",$n,200)
    Sleep(13)
WEnd
$obj = 0
Exit

You need:

- GIF89.DLL (of course), registred

- vaca19.gif (attachment), in the same DIR than the current script.

You can/must adapt "+= 2" and/or "Sleep(13)" at the speed of your CPU.

:)

Link to comment
Share on other sites

  • 1 month later...

How come when I change this, it doesn't work:

;_ResourceSetImageToCtrl($ID,"#1", 10, @ScriptDir & "\TEST.dll"); 10, I'm using RC DATA
_ResourceSetImageToCtrl($ID, "Logo.bmp", 2)

Yes Logo.bmp exists at @scriptdir

?

Help. Thanks!

Link to comment
Share on other sites

How come when I change this, it doesn't work:

;_ResourceSetImageToCtrl($ID,"#1", 10, @ScriptDir & "\TEST.dll"); 10, I'm using RC DATA
_ResourceSetImageToCtrl($ID, "Logo.bmp", 2)

Yes Logo.bmp exists at @scriptdir

?

Help. Thanks!

Use

GUICtrlSetImage($ID, "Logo.bmp")

If file exists in script directory you needn't use resources functions.

Link to comment
Share on other sites

  • 6 months later...

Hey bro, I just tried to download your DLL to see if it works for me, but the link is broken =( I tried googling for "SplashImage_Using_DLL.zip" to see if there was a known mirror or if you had changed around your website structure, but no matches ='(

Please re-up for us plz i'd be very thankful! =D

Link to comment
Share on other sites

  • 8 months later...

Hey bro, I just tried to download your DLL to see if it works for me, but the link is broken =( I tried googling for "SplashImage_Using_DLL.zip" to see if there was a known mirror or if you had changed around your website structure, but no matches ='(

Please re-up for us plz i'd be very thankful! =D

Unfortunately my PC was stolen last week, so I could not provide u the files, sorry. May be I will upload another dll example.

AUTOIT[sup] I'm lovin' it![/sup]

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...