Jump to content
Sign in to follow this  

delay on ControlMove

Recommended Posts



well in this example there's some kind of delaying when moving the window with the pic

but when moving the pic only it is not delayed

try removing the comment in line 20

#include <misc.au3>
#include <GuiConstants.au3>
#include <WindowsConstants.au3>

$gui = GUICreate("Drag Pic & GUI",500,400,100,100,$WS_CLIPCHILDREN + $WS_SIZEBOX)
$ip = GUICtrlCreatePic(@WindowsDir & "\Web\Wallpaper\Bliss.bmp", 0, 0, @DesktopWidth, @DesktopHeight)

While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $GUI_EVENT_CLOSE
                $mp = MouseGetPos()
                $cp = ControlGetPos($gui, "", $ip)
                While _IsPressed(1)
                    $nm = MouseGetPos()
                ;WinMove($gui ,"",$cp[0] - $mp[0] + $nm[0], $cp[1] - $mp[1] + $nm[1])
                    ControlMove($gui, "", $ip, (- $nm[0] )+1, (- $nm[1])+1)

[font="Palatino Linotype"][size="3"]AutoIt Script Examples :[/size][/font][font="Palatino Linotype"][size="3"]_CaptureBehindWindowGlass CMD for Windows Vista/Seven[/size][/font][left][/left][font="Palatino Linotype"][size="3"]Non AutoIt Script programs : Border Skin - Aero Glass On XP[/size][/font]

Share this post

Link to post
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
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.