Jump to content
Sign in to follow this  
MerkurAlex

button that moves window

Recommended Posts

MerkurAlex

Ok so i have a button and when it is down it should act like a titlebar so it moves the window to mouse position ive tried but i cant seem to figure it out.


[quote name='PsaltyDS' post='635433' date='Jan 27 2009, 07:04 AM']Larry is a mass murderer?! It's always the quiet, clean cut, bald guys... [/quote]

Share this post


Link to post
Share on other sites
qazwsx

$pos = mousegetpos ()
If _ispressed (01) and $pos[0] > "area of button" and $pos[0] < area of button and $pos[1] > area of button and $pos[1] < area of button
     Do
$pos = mousegetpos ()
Guictrlsetpos ($window, $pos[0], $pos[1]

Until not _ispressed(01)
Endif

You would have to add some math to the movement of the window to make it work, but i think it should work. This is probably not the best way to do it but it should work.

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  

×