Maybe this is done before, but I was looking for a quick way to slide my GUI from one place to another.
Let me know what you think.....
Posted 22 August 2006 - 07:31 AM
Posted 25 August 2006 - 11:57 AM
Posted 25 August 2006 - 12:09 PM
SciTE for AutoItDirections for Submitting Standard UDFs
Don't argue with an idiot; people watching may not be able to tell the difference.
Posted 25 August 2006 - 12:13 PM
Thanx...I like it DaLiMan!
I am going to use your function to add floating buttons that attach to a Gui and follow it around the screen, like on the title bar on IE, which is a big waste of space.
I didn't find anything while searching for "Floating Toolbar"
TKS
:
Posted 25 August 2006 - 12:19 PM
Edited by gafrost, 19 September 2006 - 12:23 AM.
SciTE for AutoItDirections for Submitting Standard UDFs
Don't argue with an idiot; people watching may not be able to tell the difference.
Posted 25 August 2006 - 12:20 PM
WinAnimate does not let you move the script all over the place.it's ok, but I prefer WinAnimate
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd2, "int", 100, "long", 0x00040001);slide in from left
Posted 25 August 2006 - 12:22 PM
You are correct, you might think about combining, make the gui animate (appear) from random positions.WinAnimate does not let you move the script all over the place.
It slides the window in place, but it only uses the size and location of the GUI to do that...
If I'm wrong let me know!!!
But I agree, _WinAnimate is more advanced...
And if you are capable of DLL call U can use the 'AnimateWindow' function which I found in several scripts I downloaded from the forum...
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd2, "int", 100, "long", 0x00040001);slide in from left
SciTE for AutoItDirections for Submitting Standard UDFs
Don't argue with an idiot; people watching may not be able to tell the difference.
Posted 25 August 2006 - 12:33 PM
You are correct, you might think about combining, make the gui animate (appear) from random positions.
Posted 25 August 2006 - 12:53 PM
#include <GUIConstants.au3> #include "WinAnimate.au3" _Main() Func _Main() $gui = GUICreate("demo", 300, 100, @DesktopWidth, @DesktopHeight) $But_Start = GUICtrlCreateButton("Random", 20, 20, 100, 20) $But_Stop = GUICtrlCreateButton("Exit", 20, 60, 100, 20) _GuiRandomPos($gui, $AW_FADE_IN, $AW_FADE_OUT, 50, 600) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $But_Stop ExitLoop Case $msg = $But_Start _GuiRandomPos($gui, $AW_FADE_IN, $AW_FADE_OUT, 50, 600) Case Else ;;; EndSelect WEnd EndFunc ;==>_Main Func _GuiRandomPos(ByRef $gui, ByRef Const $animation_show, ByRef Const $animation_hide, $min, $max) $dx = Random($min, $max) $dy = Random($min, $max) _WinAnimate ($gui, $animation_hide) WinMove($gui, "", $dx, $dy) _WinAnimate ($gui, $animation_show) GUISetState(@SW_SHOW, $gui) EndFunc ;==>_GuiRandomPos
SciTE for AutoItDirections for Submitting Standard UDFs
Don't argue with an idiot; people watching may not be able to tell the difference.
0 members, 0 guests, 0 anonymous users