Sign in to follow this  
Followers 0
psychotik2k3

Mouse Clicks Through My Gui Form

2 posts in this topic

Hi i have a little problem, i use autoit to add a simple GUI to show somes information on the corner down right.

It half transparent and i want to be able to click trhough it like if it's not there, to be able to click a icon below or resize a window who has its corner below it.

is there a way to do it or not ??

thanks

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

A soultion:

Hide the GUI when the mouse comes over it, then show it when it is out of range

#include <GUIConstants.au3>
Global $m_hidden = 0
;;;;;your GUI creation code here...

;;The GUI loop
while 1
   $msg_adv = GuiGetMsg(1)
   $msg = $msg_adv[0];;Use $msg in your normal code

;;Your GUI update code here...


  $m_winpos = WinGetPos ( $msg_adv[1] )
  If $msg_adv[3] > 0 And $msg_adv[4] > 0 And $msg_adv[3] < $m_winpos[2] And $msg_adv[4] < $m_winpos[3] And $m_hidden = 0 Then;;If mouse is within bounds of window,
     GuiSetState(@SW_HIDE, $msg_adv[1]);;Hide window
     $m_hidden = 1
  ElseIf $m_hidden == 1 Then
     GuiSetState(@SW_SHOW, $msg_adv[1])
     $m_hidden = 0
  EndIf
wend

#)

Edited by nfwu

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  
Followers 0