Jump to content

Recommended Posts

Posted

With isSlideShow.dll v1.02 (2014), an easy to use InnoSetup plugin, we can create  SlideShow with several Transition effects

Jpg, png, bmp are supported

 

#Region    ;************ Includes ************
#include <GUIConstantsEx.au3>
#include <File.au3>
#EndRegion ;************ Includes ************

Opt('MustDeclareVars', 1)

#Region ------ Global Variables ------------------------------
Global $hGui, $iGuiWidth = 600, $iGuiHeight = 450
Global $hSlideShowDll = DllOpen('isSlideShow.dll') ; InnoSetup plugin
Global $aPicList, $iIndex, $iStretch = 2, $iTimer = 3000, $iTransitionEffect = 1  ; 1 = random
#EndRegion ------ Global Variables ------------------------------

#Region ------ Init ------------------------------
$hGui = GUICreate('isSlideShow.dll Transition effect Example', $iGuiWidth, $iGuiHeight)
$aPicList = _FileListToArray(@ScriptDir & '\Slides', '*', $FLTA_FILES, True)
GUISetState()
_InitializeSlideShow()
_ShowImage()
AdlibRegister('_ShowImage', $iTimer)
#EndRegion ------ Init ------------------------------

#Region ------ Main Loop ------------------------------
While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            AdlibUnRegister('_ShowImage')
            _DeinitializeSlideShow()
            DllClose($hSlideShowDll)
            GUIDelete($hGui)
            Exit
    EndSwitch
    Sleep(30)
WEnd
#EndRegion ------ Main Loop ------------------------------

Func _DeinitializeSlideShow()
;~     procedure DeinitializeSlideShow
    Local $aRet = DllCall($hSlideShowDll, 'int', 'DeinitializeSlideShow')
    If Not @error Then Return $aRet[0]
EndFunc   ;==>_DeinitializeSlideShow

Func _InitializeSlideShow()
;~  procedure InitializeSlideShow(Hwnd:Thandle; l,t,w,h:integer;Animate:boolean; Stretch:integer)
    Local $aRet = DllCall($hSlideShowDll, 'int', 'InitializeSlideShow', _
            'hwnd', $hGui, _      ; Window handle
            'int', 0, _           ; x
            'int', 0, _           ; y
            'int', $iGuiWidth, _  ; w
            'int', $iGuiHeight, _ ; h
            'bool', True, _       ; Animate - Enable/disable
            'int', $iStretch)     ; Stretch - Determines the type of image stretching, Possible values :
;~                                  0 - True image size.
;~                                  1 - Proportional stretching of the image to the window size.
;~                                  2 - Stretching the image to fill the window.
    If Not @error Then Return $aRet[0]
EndFunc   ;==>_InitializeSlideShow

Func _ShowImage()
;~     Transition effect possible values: 1 - Random effect.
;~                                     2 - Alpha Blend.
;~                                     3 - Blocks.
;~                                     4 - Circle.
;~                                     5 - Diagonal.
;~                                     6 - Fuse.
;~                                     7 - InterLaced.
;~                                     8 - Page.
;~                                     9 - Radial.
;~                                    10 - Roll.
;~                                    11 - Waterfall.
;~                                    12 - Wipe.
    $iIndex = ($iIndex = UBound($aPicList) - 1) ? 1 : $iIndex + 1
;~  procedure ShowImage(ipath:PAnsiChar; Effect:integer)
    Local $aRet = DllCall($hSlideShowDll, 'int', 'ShowImage', 'str', $aPicList[$iIndex], 'int', $iTransitionEffect)
    If Not @error Then Return $aRet[0]
EndFunc   ;==>_ShowImage

 

Source+Dll+Pictures are in following archive for test it

SlideShow Transition effect.7z

 

Happy New Year 🫡

AutoIt 3.3.18.0 X86 - SciTE 5.5.7WIN 11 24H2 X64 - Other Examples Scripts

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
×
×
  • Create New...