testingtest Posted March 16, 2007 Share Posted March 16, 2007 I don't understand why this isn't working. I even put a message box for testing the message box responses but the dll call doesn't #include <GUIConstants.au3> Global $hwnd $hwnd = GUICreate("",200,600,@DesktopWidth-200,0,$WS_POPUP,$WS_EX_TOOLWINDOW) GUISetBkColor(0) $start = GUICtrlCreateLabel("Tool Bar",0,0,200,28) GUICtrlSetFont(-1,18,500) GUICtrlSetColor(-1,0xFFFFFF) GUICtrlCreateGraphic(0,28,200,2) GUICtrlSetBkColor(-1,0xFFFFFF) $Command = GUICtrlCreateInput("Enter Command", 0, 32, 200, 20) $Run = GUICtrlCreateButton("Run..." , 0 , 55 , 200 , 20) $Slide = GUICtrlCreateButton(">" , 0 ,78 , 15 , 20) GUICtrlCreateLabel("will hide the tool bar" , 25 , 80 ,200 ,28) GUICtrlSetColor(-1,0xFFFFFF) GUISetState(@SW_SHOW) WinSetTrans($hwnd,"",150) While 1 $msg = GuiGetMsg() Select Case $msg = $Slide ; _Slide() MsgBox(0 , "" , "test") DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 500, "long", 0x00040001) EndSelect WEnd Link to comment Share on other sites More sharing options...
_Kurt Posted March 17, 2007 Share Posted March 17, 2007 Not too sure why that's not working, but perhaps consider using an "implode" effect: DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $GUI, "int", 1000, "long", 0x00050010) Kurt Awaiting Diablo III.. Link to comment Share on other sites More sharing options...
testingtest Posted March 17, 2007 Author Share Posted March 17, 2007 (edited) Not too sure why that's not working, but perhaps consider using an "implode" effect: DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $GUI, "int", 1000, "long", 0x00050010) Kurt well the hole point of it was to slide to make it hidden more or less [edited] yep implode works can someone help me figure why this one won't work though Edited March 17, 2007 by testingtest Link to comment Share on other sites More sharing options...
_Kurt Posted March 17, 2007 Share Posted March 17, 2007 (edited) Well, I have no clue how to solve your problem, but I'll throw some more suggestions at ya: (Note: This example script is taken from Autoit 123) $hwnd = GUICreate("", 300, 200) GUICtrlCreateLabel("", 50, 50, 200, 50) GUICtrlSetFont( -1, 16, 800) DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00080000);fade-in GUISetState() DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00090000);fade-out DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040001);slide in from left DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00050002);slide out to left DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040002);slide in from right DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00050001);slide out to right DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040004);slide-in from top DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00050008);slide-out to top DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040008);slide-in from bottom DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00050004);slide-out to bottom DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040005);diag slide-in from Top-left DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x0005000a);diag slide-out to Top-left DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040006);diag slide-in from Top-Right DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00050009);diag slide-out to Top-Right DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040009);diag slide-in from Bottom-left DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00050006);diag slide-out to Bottom-left DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x0004000a);diag slide-in from Bottom-right DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00050005);diag slide-out to Bottom-right DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040010);explode Sleep(1000) DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00050010);implode Good luck Kurt EDIT: Minor Spelling Mistake Edited March 17, 2007 by _Kurt Awaiting Diablo III.. Link to comment Share on other sites More sharing options...
nfwu Posted March 17, 2007 Share Posted March 17, 2007 0x00040001 if for sliding *in* from left Use 0x00050002 instead. #) TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
testingtest Posted March 17, 2007 Author Share Posted March 17, 2007 0x00040001 if for sliding *in* from leftUse 0x00050002 instead.#)I want it to look like this Visit My WebsiteI guess Ill have take his a part to get it to work with my gui Link to comment Share on other sites More sharing options...
_Kurt Posted March 17, 2007 Share Posted March 17, 2007 It's quite simple to create that effect, keep in mind that it requires two GUI's. I will provide an simple example if I have the time. Kurt Awaiting Diablo III.. Link to comment Share on other sites More sharing options...
testingtest Posted March 17, 2007 Author Share Posted March 17, 2007 It's quite simple to create that effect, keep in mind that it requires two GUI's. I will provide an simple example if I have the time.Kurtok cool , if not I might be able to do it but no at my pc atm Link to comment Share on other sites More sharing options...
_Kurt Posted March 17, 2007 Share Posted March 17, 2007 (edited) Here you go:expandcollapse popup#include <GuiConstants.au3> $hwnd = GuiCreate("test", 482, 92,-1, -1) Global $pos = WinGetPos($hwnd) $Button_1 = GuiCtrlCreateButton("Button1", 40, 20, 80, 40) $Button_2 = GuiCtrlCreateButton("Button2", 140, 20, 80, 40) $Button_3 = GuiCtrlCreateButton("Button3", 260, 20, 80, 40) $SLIDEIN = GuiCtrlCreateButton("Slide it!", 390, 10, 90, 80) GuiSetState() $hwnd2 = GUICreate("", 40, 92, $pos[0]+482-40, $pos[1]) $SLIDEOUT = GUICtrlCreateButton("<<", 0,0,40,91) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $SLIDEIN Slide1() Case $msg = $SLIDEOUT Slide2() EndSelect WEnd Func Slide1() DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00050001);slide out to right GUISetState(@SW_HIDE, $hwnd) GUISetState(@SW_SHOW, $hwnd2) EndFunc ;==>Slide_out Func Slide2() DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040002);slide in from right GUISetState(@SW_HIDE, $hwnd2) GUISetState(@SW_SHOW, $hwnd) EndFunc ;==>Slide_inoÝ÷ Ù(hºWp¢¹)z·ÞrÙr*êí2Eæ¥7¶²XzËh¶«mÙmêÞßÛ(ëajÛ%׬¶azWµ«¢+Ø¥¹±Õ±ÐíÕ¥ ½¹ÍѹÑ̹ÔÌÐì((ÀÌØí¡Ý¹ôÕ¥ ÉÑ ÅÕ½ÐíÑÍÐÅÕ½Ðì°ÐàȰäȰ´Ä°´Ä¤)±½°ÀÌØíÁ½Ìô]¥¹ÑA½Ì ÀÌØí¡Ý¹¤(ÀÌØí ÕÑѽ¹|ÄôÕ¥ Ñɱ ÉÑ ÕÑѽ¸ ÅÕ½Ðí ÕÑѽ¸ÄÅÕ½Ðì°ÐÀ°ÈÀ°àÀ°ÐÀ¤(ÀÌØí ÕÑѽ¹|ÈôÕ¥ Ñɱ ÉÑ ÕÑѽ¸ ÅÕ½Ðí ÕÑѽ¸ÈÅÕ½Ðì°ÄÐÀ°ÈÀ°àÀ°ÐÀ¤(ÀÌØí ÕÑѽ¹|ÌôÕ¥ Ñɱ ÉÑ ÕÑѽ¸ ÅÕ½Ðí ÕÑѽ¸ÌÅÕ½Ðì°ÈØÀ°ÈÀ°àÀ°ÐÀ¤(ÀÌØíM1%%8ôÕ¥ Ñɱ ÉÑ ÕÑѽ¸ ÅÕ½ÐíM±¥¥ÐÌÌìÅÕ½Ðì°ÌäÀ°ÄÀ°äÀ°àÀ¤)Õ¥MÑMÑÑ ¤((ÀÌØí¡Ý¹ÈôU% ÉÑ ÅÕ½ÐìÅÕ½Ðì°ÐÀ°äȰÀÌØíÁ½ÍlÁt°ÀÌØíÁ½ÍlÅt¤(ÀÌØíM1%=UPôU% Ñɱ ÉÑ ÕÑѽ¸ ÅÕ½ÐìÐìÐìÅÕ½Ðì°À°À°ÐÀ°äĤ()]¡¥±Ä($ÀÌØíµÍôÕ¥Ñ5Í ¤(%M±Ð(% ÍÀÌØíµÍôÀÌØíU%}Y9Q} 1=M($%á¥Ð(% ÍÀÌØíµÍôÀÌØíM1%%8($%M±¥Ä ¤(% ÍÀÌØíµÍôÀÌØíM1%=UP($%M±¥È ¤(%¹M±Ð)]¹(()Õ¹M±¥Ä ¤(±± ±° ÅÕ½ÐíÕÍÈÌȹ±°ÅÕ½Ðì°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÅÕ½Ðí¹¥µÑ]¥¹½ÜÅÕ½Ðì°ÅÕ½Ðí¡Ý¹ÅÕ½Ðì°ÀÌØí¡Ý¹°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÔÀÀ°ÅÕ½Ðí±½¹ÅÕ½Ðì°ÁàÀÀÀÔÀÀÀȤíͱ¥½ÕÐѼ±Ð(U%MÑMÑÑ¡M]}!%°ÀÌØí¡Ý¹¤(%U%MÑMÑÑ¡M]}M!=°ÀÌØí¡Ý¹È¤)¹Õ¹ìôôÐíM±¥}½ÕÐ(()Õ¹M±¥È ¤(±± ±° ÅÕ½ÐíÕÍÈÌȹ±°ÅÕ½Ðì°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÅÕ½Ðí¹¥µÑ]¥¹½ÜÅÕ½Ðì°ÅÕ½Ðí¡Ý¹ÅÕ½Ðì°ÀÌØí¡Ý¹È°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÄÀÀÀ°ÅÕ½Ðí±½¹ÅÕ½Ðì°ÁàÀÀÀÐÀÀÀĤíͱ¥¥¸É½´±Ð(U%MÑMÑÑ¡M]}!%°ÀÌØí¡Ý¹È¤(%U%MÑMÑÑ¡M]}M!=°ÀÌØí¡Ý¹¤)¹Õ¹ìôôÐíM±¥}¥¸EDIT: Fixed 1 mistake in DllCall Edited March 17, 2007 by _Kurt Awaiting Diablo III.. Link to comment Share on other sites More sharing options...
testingtest Posted March 17, 2007 Author Share Posted March 17, 2007 Here you go: expandcollapse popup#include <GuiConstants.au3> $hwnd = GuiCreate("test", 482, 92,-1, -1) Global $pos = WinGetPos($hwnd) $Button_1 = GuiCtrlCreateButton("Button1", 40, 20, 80, 40) $Button_2 = GuiCtrlCreateButton("Button2", 140, 20, 80, 40) $Button_3 = GuiCtrlCreateButton("Button3", 260, 20, 80, 40) $SLIDEIN = GuiCtrlCreateButton("Slide it!", 390, 10, 90, 80) GuiSetState() $hwnd2 = GUICreate("", 40, 92, $pos[0]+482-40, $pos[1]) $SLIDEOUT = GUICtrlCreateButton("<<", 0,0,40,91) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $SLIDEIN Slide1() Case $msg = $SLIDEOUT Slide2() EndSelect WEnd Func Slide1() DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00050001);slide out to right GUISetState(@SW_HIDE, $hwnd) GUISetState(@SW_SHOW, $hwnd2) EndFunc ;==>Slide_out Func Slide2() DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040002);slide in from right GUISetState(@SW_HIDE, $hwnd2) GUISetState(@SW_SHOW, $hwnd) EndFunc ;==>Slide_inoÝ÷ Ù(hºWp¢¹)z·ÞrÙr*êí2Eæ¥7¶²XzËh¶«mÙmêÞßÛ(ëajÛ%׬¶azWµ«¢+Ø¥¹±Õ±ÐíÕ¥ ½¹ÍѹÑ̹ÔÌÐì((ÀÌØí¡Ý¹ôÕ¥ ÉÑ ÅÕ½ÐíÑÍÐÅÕ½Ðì°ÐàȰäȰ´Ä°´Ä¤)±½°ÀÌØíÁ½Ìô]¥¹ÑA½Ì ÀÌØí¡Ý¹¤(ÀÌØí ÕÑѽ¹|ÄôÕ¥ Ñɱ ÉÑ ÕÑѽ¸ ÅÕ½Ðí ÕÑѽ¸ÄÅÕ½Ðì°ÐÀ°ÈÀ°àÀ°ÐÀ¤(ÀÌØí ÕÑѽ¹|ÈôÕ¥ Ñɱ ÉÑ ÕÑѽ¸ ÅÕ½Ðí ÕÑѽ¸ÈÅÕ½Ðì°ÄÐÀ°ÈÀ°àÀ°ÐÀ¤(ÀÌØí ÕÑѽ¹|ÌôÕ¥ Ñɱ ÉÑ ÕÑѽ¸ ÅÕ½Ðí ÕÑѽ¸ÌÅÕ½Ðì°ÈØÀ°ÈÀ°àÀ°ÐÀ¤(ÀÌØíM1%%8ôÕ¥ Ñɱ ÉÑ ÕÑѽ¸ ÅÕ½ÐíM±¥¥ÐÌÌìÅÕ½Ðì°ÌäÀ°ÄÀ°äÀ°àÀ¤)Õ¥MÑMÑÑ ¤((ÀÌØí¡Ý¹ÈôU% ÉÑ ÅÕ½ÐìÅÕ½Ðì°ÐÀ°äȰÀÌØíÁ½ÍlÁt°ÀÌØíÁ½ÍlÅt¤(ÀÌØíM1%=UPôU% Ñɱ ÉÑ ÕÑѽ¸ ÅÕ½ÐìÐìÐìÅÕ½Ðì°À°À°ÐÀ°äĤ()]¡¥±Ä($ÀÌØíµÍôÕ¥Ñ5Í ¤(%M±Ð(% ÍÀÌØíµÍôÀÌØíU%}Y9Q} 1=M($%á¥Ð(% ÍÀÌØíµÍôÀÌØíM1%%8($%M±¥Ä ¤(% ÍÀÌØíµÍôÀÌØíM1%=UP($%M±¥È ¤(%¹M±Ð)]¹)Õ¹M±¥Ä ¤(±± ±° ÅÕ½ÐíÕÍÈÌȹ±°ÅÕ½Ðì°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÅÕ½Ðí¹¥µÑ]¥¹½ÜÅÕ½Ðì°ÅÕ½Ðí¡Ý¹ÅÕ½Ðì°ÀÌØí¡Ý¹°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÔÀÀ°ÅÕ½Ðí±½¹ÅÕ½Ðì°ÁàÀÀÀÔÀÀÀȤíͱ¥½ÕÐѼ±Ð(U%MÑMÑÑ¡M]}!%°ÀÌØí¡Ý¹¤(%U%MÑMÑÑ¡M]}M!=°ÀÌØí¡Ý¹È¤)¹Õ¹ìôôÐíM±¥}½ÕÐ)Õ¹M±¥È ¤(±± ±° ÅÕ½ÐíÕÍÈÌȹ±°ÅÕ½Ðì°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÅÕ½Ðí¹¥µÑ]¥¹½ÜÅÕ½Ðì°ÅÕ½Ðí¡Ý¹ÅÕ½Ðì°ÀÌØí¡Ý¹È°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÄÀÀÀ°ÅÕ½Ðí±½¹ÅÕ½Ðì°ÁàÀÀÀÐÀÀÀĤíͱ¥¥¸É½´±Ð(U%MÑMÑÑ¡M]}!%°ÀÌØí¡Ý¹È¤(%U%MÑMÑÑ¡M]}M!=°ÀÌØí¡Ý¹¤)¹Õ¹ìôôÐíM±¥}¥¸ EDIT: Fixed 1 mistake in DllCall thanks lol I just figured out how to do it. I really am thankful though and will compare them bet yours is better Link to comment Share on other sites More sharing options...
_Kurt Posted March 17, 2007 Share Posted March 17, 2007 No problem, please make sure to use WinGetPos for the first GUI, since people may have different resolutions. $pos = WinGetPos($hwnd) $hwnd2 = GUICreate("", 40, 92, $pos[0], $pos[1]) Kurt Awaiting Diablo III.. Link to comment Share on other sites More sharing options...
testingtest Posted March 17, 2007 Author Share Posted March 17, 2007 (edited) No problem, please make sure to use WinGetPos for the first GUI, since people may have different resolutions. Kurt well this is what I got so far still need finish the slider, expandcollapse popup#include <GUIConstants.au3> Global $hwnd , $hwnd2, $hide_state = 0, $btn_state = 0, $side = "right" $hwnd = GUICreate("" , 200 , 600 , @DesktopWidth-200 , 0 , $WS_POPUP, $WS_EX_TOOLWINDOW) GUISetBkColor(0) $start = GUICtrlCreateLabel("Tool Bar",0,0,200,28) GUICtrlSetFont(-1,18,500) GUICtrlSetColor(-1,0xFFFFFF) GUICtrlCreateGraphic(0,28,200,2) GUICtrlSetBkColor(-1,0xFFFFFF) $Command = GUICtrlCreateInput("Enter Command", 0, 32, 200, 20) $Run = GUICtrlCreateButton("Run..." , 0 , 55 , 200 , 20) $Slide = GUICtrlCreateButton(">" , 0 ,78 , 15 , 20) GUICtrlCreateLabel("will hide the tool bar" , 25 , 80 ,200 ,28) GUICtrlSetColor(-1,0xFFFFFF) GUISetState(@SW_SHOW) WinSetTrans($hwnd,"",150) While 1 $msg1 = GUIGetMsg() If $msg1 = $Slide Then Slide_out() WEnd Func _Slider() $hwnd2 = GuiCreate("" , 30 , @DesktopHeight , @DesktopWidth-30 , 0 , $WS_POPUP , $WS_EX_TOOLWINDOW) $Slide = GUICtrlCreateButton("<" , 0 , 0 , 30 , @DesktopHeight) GuiSetState(@SW_SHOW) While 1 $msg1 = GuiGetMsg() If $msg1 = $Slide Then Slide_in() WEnd ;GUISetState(@SW_SHOW, $hwnd2) ;WinActivate($hwnd2) ;WinWaitActive($hwnd2) EndFunc Func Slide_in() $hide_state = 0 GUISetState(@SW_HIDE, $hwnd2) ; If $side = "left" Then DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd2, "int", 500, "long", 0x00040001);slide in from left If $side = "right" Then DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd2, "int", 500, "long", 0x00040002);slide in from right WinActivate($hwnd) WinWaitActive($hwnd) EndFunc ;==>Slide_in Func Slide_out() $hide_state = 1 ;Btn_reset() ;If $side = "left" Then DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 500, "long", 0x00050002);slide out to left If $side = "right" Then DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 500, "long", 0x00050001);slide out to right _Slider() EndFunc ;==>Slide_out so this doesn't fit your resolution? [edited] lol when I release the final version theres going to be a lot of credits Edited March 17, 2007 by testingtest Link to comment Share on other sites More sharing options...
_Kurt Posted March 17, 2007 Share Posted March 17, 2007 Sorry for the late reply, I had been gone all night. You should have been able to study my script & figure out exactly what you need to do for this to work. You had a couple of mistakes with the GUI_HIDE & GUI_SHOW, and you shouldn't re-create a new GUI & start a new loop everytime you want it to slide. What I did makes a lot more sense: I simply create the secondary GUI before-hand & did not "show" or set it's state. Always try to keep everything in one loop, it makes things easier (in my mind). Here's the fixed up version: expandcollapse popup;First we must understand a couple of things, ;this requires 2 GUI's and we are basically ;switching states of the GUI's to show and hide ;each time the slide button is pressed. #include <GUIConstants.au3> Global $hwnd , $hwnd2, $hide_state = 0, $btn_state = 0, $side = "right" $hwnd = GUICreate("" , 200 , 600 , @DesktopWidth-200 , 0 , $WS_POPUP, $WS_EX_TOOLWINDOW) Global $pos = WinGetPos($hwnd) ;<-- Note that we get the position of the GUI WinSetOnTop($hwnd, "", 1) ;<-- We keep the GUI on top of all windows GUISetBkColor(0) $start = GUICtrlCreateLabel("Tool Bar",0,0,200,28) GUICtrlSetFont(-1,18,500) GUICtrlSetColor(-1,0xFFFFFF) GUICtrlCreateGraphic(0,28,200,2) GUICtrlSetBkColor(-1,0xFFFFFF) $Command = GUICtrlCreateInput("Enter Command", 0, 32, 200, 20) $Run = GUICtrlCreateButton("Run..." , 0 , 55 , 200 , 20) $Slide = GUICtrlCreateButton(">" , 0 ,78 , 15 , 20) GUICtrlCreateLabel("will hide the tool bar" , 25 , 80 ,200 ,28) GUICtrlSetColor(-1,0xFFFFFF) GUISetState() WinSetTrans($hwnd,"",150) $hwnd2 = GuiCreate("" , 30, 600, @DesktopWidth-30, 0, $WS_POPUP , $WS_EX_TOOLWINDOW) ;<- Fixed position & size $Slide2 = GUICtrlCreateButton("<", 0, 0, 30 , 600) ;<- Fixed position & size WinSetOnTop($hwnd2, "", 1) ;<-- We keep the GUI on top of all windows IF the gui is actually "showing" While 1 $msg1 = GUIGetMsg() Select Case $msg1 = $Slide Slide_out() Case $msg1 = $Slide2 ;Even though this button may not be displayed at times, we still add it in the loop Slide_in() Case $msg1 = $GUI_EVENT_CLOSE Exit EndSelect WEnd Func Slide_in() ;If the button is pressed in the MAIN gui, we will do the following: ; If $side = "left" Then DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd2, "int", 500, "long", 0x00040001);slide in from left If $side = "right" Then DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 500, "long", 0x00040002);slide in from right GUISetState(@SW_HIDE, $hwnd2); After the slide effect is done, we must then actually HIDE the secondary gui GUISetState(@SW_SHOW, $hwnd);And of course SHOW the main GUI EndFunc ;==>Slide_in Func Slide_out() ;If the button is pressed in the secondary gui, we will do the following: ;Btn_reset() ;If $side = "left" Then DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 500, "long", 0x00050002);slide out to left If $side = "right" Then DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 500, "long", 0x00050001);slide out to right GUISetState(@SW_HIDE, $hwnd); After the slide effect is done, we must then actually HIDE the main gui GUISetState(@SW_SHOW, $hwnd2) ;And of course SHOW the secondary GUI EndFunc ;==>Slide_out Kurt Awaiting Diablo III.. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now