#include #include #include #include GUISetOnEvent($GUI_EVENT_CLOSE, "Cleanup") Global $hGUI, $hImage, $hGraphic, $TransTest, $TransTestCreate, $Hover = 0, $swap = True #Region Panels ; $Panel1 = "panels\Slide1.PNG" ; $Panel2 = "panels\Slide2.PNG" ; $Panel3 = "panels\Slide3.PNG" ; $Panel4 = "panels\Slide4.PNG" ; $Panel5 = "panels\Slide5.PNG" ; $Panel6 = "panels\Slide6.PNG" #EndRegion Panels #Region Panels $Panel1 = "Slide1.PNG" $Panel2 = "Slide2.PNG" $Panel3 = "Slide3.PNG" $Panel4 = "Slide4.PNG" $Panel5 = "Slide5.PNG" $Panel6 = "Slide6.PNG" #EndRegion Panels #Region Buttons $BeginBackup = "BeginBackup.png" $BeginRestore = "BeginRestore.png" $CloseUtil = "CloseUtil.png" $GoBack = "GoBack.png" $NewComp = "NewComp.png" $OldComp = "OldComp.png" $OpenSD = "OpenSD.png" $RedCloseUtil = "RedCloseUtil.png" ;$_BeginBackup = "Buttons\_BeginBackup.png" ;$_BeginRestore = "Buttons\_BeginRestore.png" ;$_CloseUtil = "Buttons\_CloseUtil.png" ;$_GoBack = "Buttons\_GoBack.png" ;$_NewComp = "Buttons\_NewComp.png" ;$_OldComp = "Buttons\_OldComp.png" ;$_OpenSD = "Buttons\_OpenSD.png" ;$_RedCloseUtil = "Buttons\_RedCloseUtil.png" ;$_x = "Buttons\_x.png" #EndRegion Buttons Global Const $STM_SETIMAGE = 0x0172 $hGUI = GUICreate("Backup / Restore Utility Version .5", 768, 480, -1, -1) GUISetState() _GDIPlus_Startup() Draw() Sleep(3000) $iScale = 1.5 _GDIPlus_GraphicsTranslateTransform($ThePicBeginBackup, 100, 100, True) _GDIPlus_GraphicsScaleTransform($ThePicBeginBackup, $iScale, $iScale, True) _GDIPlus_GraphicsTranslateTransform($ThePicBeginBackup, 100, 100, True) Draw() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 Exit Case $ThePicBeginBackup PerformBackup() Panel(3) Case $ThePicBeginRestore PerformRestore() Panel(5) Case $ThePicCloseUtil Exit Case $ThePicGoBack Panel(1) Case $ThePicNewComp Panel(4) Case $ThePicOldComp Panel(2) Case $ThePicOpenSD OpenSD() Case $ThePicRedCloseUtil Exit EndSwitch WEnd Func Panel($Num) HideAll() ; switch $Num ; Case 1 ; GuiCtrlSetState( $NewComp , $GUI_SHOW) ; GuiCtrlSetState( $OldComp , $GUI_SHOW) ; Case 2 ; GuiCtrlSetState( $BeginBackup , $GUI_SHOW) ; GuiCtrlSetState( $GoBack , $GUI_SHOW) ; Case 3 ; GuiCtrlSetState( $CloseUtil , $GUI_SHOW) ; GuiCtrlSetState( $GoBack , $GUI_SHOW) ; Case 4 ; GuiCtrlSetState( $BeginRestore , $GUI_SHOW) ; GuiCtrlSetState( $GoBack , $GUI_SHOW) ; Case 5 ; GuiCtrlSetState( $CloseUtil , $GUI_SHOW) ; GuiCtrlSetState( $GoBack , $GUI_SHOW) ; Case 6 ; GuiCtrlSetState( $CloseUtil , $GUI_SHOW) ; GuiCtrlSetState( $GoBack , $GUI_SHOW) ; GuiCtrlSetState( $RedCloseUtil , $GUI_SHOW) ; ; endswitch EndFunc ;==>Panel Func Cleanup() ; _GDIPlus_GraphicsDispose($hGraphic) ; _GDIPlus_ImageDispose($hImage) ; _GDIPlus_GraphicsDispose($hGraphic) ; _GDIPlus_ImageDispose($hImage) ; _GDIPlus_GraphicsDispose($hGraphic) ; _GDIPlus_ImageDispose($hImage) ; _GDIPlus_GraphicsDispose($hGraphic) ; _GDIPlus_ImageDispose($hImage) ; _GDIPlus_GraphicsDispose($hGraphic) ; _GDIPlus_ImageDispose($hImage) ; _GDIPlus_GraphicsDispose($hGraphic) ; _GDIPlus_ImageDispose($hImage) ; _GDIPlus_GraphicsDispose($hGraphic) ; _GDIPlus_ImageDispose($hImage) ; _GDIPlus_GraphicsDispose($hGraphic) ; _GDIPlus_ImageDispose($hImage) ; _GDIPlus_GraphicsDispose($hGraphic) ; _GDIPlus_ImageDispose($hImage) ; _GDIPlus_GraphicsDispose($hGraphic) ; _GDIPlus_ImageDispose($hImage) ; _GDIPlus_GraphicsDispose($hGraphic) ; _GDIPlus_ImageDispose($hImage) ; _GDIPlus_GraphicsDispose($hGraphic) ; _GDIPlus_ImageDispose($hImage) ; _GDIPlus_GraphicsDispose($hGraphic) ; _GDIPlus_ImageDispose($hImage) ; _GDIPlus_GraphicsDispose($hGraphic) ; _GDIPlus_ImageDispose($hImage) ; _GDIPlus_GraphicsDispose($hGraphic) ; _GDIPlus_ImageDispose($hImage) ; _GDIPlus_Shutdown() EndFunc ;==>Cleanup Func Draw() ; ------------------------------ BACKGROUND $hImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\" & $Panel1) $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI) _GDIPlus_GraphicsDrawImage($hGraphic, $hImage, 0, 0) ; ------------------------------ /BACKGROUND Global $aaa = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\" & $OldComp) Global $aaa2 = _GDIPlus_GraphicsCreateFromHWND($hGUI) Global $ThePicBeginBackup = _GDIPlus_GraphicsDrawImage($aaa2, $aaa, 114, 218) ; ------------------------------ Global $bbb = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\" & $NewComp) Global $bbb2 = _GDIPlus_GraphicsCreateFromHWND($hGUI) Global $ThePicBeginRestore = _GDIPlus_GraphicsDrawImage($bbb2, $bbb, 381.12, 218.88) ; ------------------------------ Global $ccc = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\" & $CloseUtil) Global $ccc2 = _GDIPlus_GraphicsCreateFromHWND($hGUI) Global $ThePicCloseUtil = _GDIPlus_GraphicsDrawImage($ccc2, $ccc, 1114, 218) ; ------------------------------ Global $ddd = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\" & $GoBack) Global $ddd2 = _GDIPlus_GraphicsCreateFromHWND($hGUI) Global $ThePicGoBack = _GDIPlus_GraphicsDrawImage($ddd2, $ddd, 1114, 218) ; ------------------------------ Global $eee = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\" & $NewComp) Global $eee2 = _GDIPlus_GraphicsCreateFromHWND($hGUI) Global $ThePicNewComp = _GDIPlus_GraphicsDrawImage($eee2, $eee, 1114, 218) ; ------------------------------ Global $fff = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\" & $OldComp) Global $fff2 = _GDIPlus_GraphicsCreateFromHWND($hGUI) Global $ThePicOldComp = _GDIPlus_GraphicsDrawImage($fff2, $fff, 1114, 218) ; ------------------------------ Global $ggg = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\" & $OpenSD) Global $ggg2 = _GDIPlus_GraphicsCreateFromHWND($hGUI) Global $ThePicOpenSD = _GDIPlus_GraphicsDrawImage($ggg2, $ggg, 1114, 218) ; ------------------------------ Global $hhh = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\" & $RedCloseUtil) Global $hhh2 = _GDIPlus_GraphicsCreateFromHWND($hGUI) Global $ThePicRedCloseUtil = _GDIPlus_GraphicsDrawImage($hhh2, $hhh, 1114, 218) ; ------------------------------ EndFunc ;==>Draw Func HideAll() ; TBD EndFunc ;==>HideAll func PerformRestore() ; TBD endfunc func PerformBackup() ; TBD endfunc func OpenSD() ; TBD endfunc