eynstyne Posted July 20, 2006 Share Posted July 20, 2006 (edited) Can I use this style on an icon control? I tried, but maybe I'm doing this wrong. When I use a Picture control the whole GUI window drags otherwise. I simply want the icon to move when I hold the mouse down and move the mouse. How would I do this? (Similar to dragging icons on a desktop) Also, how would I be able to check whether the mouse button is held down. Thanks in advance... Edited July 20, 2006 by eynstyne F@m!ly Guy Fr33k! - Avatar speaks for itself__________________________________________________________________________________________ite quotes... - Is your refrigerator running? If it is, It probably runs like you...very homosexually - Christians don't believe in gravity - Geeze Brian where do you think you are, Payless?- Show me potato Salad!__________________________________________________________________________________________Programs available - Shutdown timer[indent][/indent] Link to comment Share on other sites More sharing options...
evilertoaster Posted July 20, 2006 Share Posted July 20, 2006 I believe this is possible. (This idea is assuming you are using "OnEventMode", but you cold use it with polling also im sure)so you set the icon to a function when it is clicked, then use larry's mousehook ( http://www.autoitscript.com/forum/index.php?showtopic=23173 ) and do somthing like -pseudocodeWhile MouseClickIsDown guictrlsetpos($ICON,MouseGetPos(0),MouseGetPos(1)) wendJust an idea... Link to comment Share on other sites More sharing options...
Helge Posted July 20, 2006 Share Posted July 20, 2006 Using GUIGetCursoInfo you will get the state of the left mouse-button as well as the ID for the control the mouse is hovering over. Use that info together with GUICtrlSetPos and things should start to move... 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