Sign in to follow this  
Followers 0
FlyAgain

MousseGetPos() don't work out of window.

2 posts in this topic

Hello all,

I have a problem with this code:

#RequireAdmin
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Array.au3>

#Region ### START Koda GUI section ### Form=v:\partage\getcurs.kxf
Global $Form2 = GUICreate("Interface 1", 166, 58, 0, 0,-1,$WS_EX_TOPMOST)
Global $Label1 = GUICtrlCreateLabel("X                         Y", 24, 0, 102, 20)
Global $Label2 = GUICtrlCreateLabel("Label2", 16, 24, 45, 20)
Global $Label3 = GUICtrlCreateLabel("Label3", 96, 24, 45, 20)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_PRIMARYDOWN
  local $pos=MouseGetPos()
  MsgBox("0","pos", $pos[0]&" "&$pos[1])
case $GUI_EVENT_MOUSEMOVE
  GUICtrlSetData($label2,MouseGetPos(0))
  GUICtrlSetData($label3,mousegetpos(1))
Case $GUI_EVENT_CLOSE
                Exit
EndSwitch
WEnd

It is juste for know pos of the mousse, en save it after clic, but it don't work out of window programme, can you give me an solution please?

Thanks a lot,

Fly

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