Jump to content

delay on ControlMove


komalo
 Share

Recommended Posts

hi

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

#NoTrayIcon
#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)
GUISetState()

While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $GUI_EVENT_PRIMARYDOWN
                $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)
                WEnd
    EndSwitch
WEnd
[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]
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...