SaphuA Posted November 27, 2008 Share Posted November 27, 2008 Some people suggested it as a feature for a little application I released a while ago, Minime. How do I detect if someone right-clicks the minimize icon in a window? http://www.saphua.com/ Link to comment Share on other sites More sharing options...
Influx Posted November 27, 2008 Share Posted November 27, 2008 well i am not sure exactly how to do it, but i suppose you could get the location of the minimize button. Then use the _ispressed() function. Then use an if statement. #Include <Misc.au3> while 1 $curr = MouseGetPos() ; get the mouse position $pos = WinGetPos("My Window") ;get the position on your window $p1 = $pos[0] + 170 ; how far over (x) the minimize button is from the top left corner of your app(top right corner)[use autoit window information app) $p2 = $pos[1] + 5 ;how far down (y) the minimize button goes (bottom left corner)[use autoit window information app) if $curr[0] = or > $p1 and $curr[0] < $p3 and $curr[1] = or < $p2 and _IsPressed(02) then ;what to do here endif wend untested code, may need some optimization and syntax fixing, but there is the general idea. Link to comment Share on other sites More sharing options...
SaphuA Posted November 27, 2008 Author Share Posted November 27, 2008 Thanks for your reply, although that's not really what I'm looking for. Hardcoding something like this will bring a lot of problems: what if people are using different themes or the window doesn't have the minimize button? Instead of using the right mouse button: another option I'd like to try is adding an item to the context menu when you click on the title bar. Does anyone know how to do this then? http://www.saphua.com/ 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