Jump to content
Sign in to follow this  
Phenom

how to keep gui active after losing focus

Recommended Posts

Phenom

I made a gui which shows the coordinates of the mouse. However, if I click on somewhere, it doesn't stay active. Is there a way to make the gui stay active even after clicking something else?

Share this post


Link to post
Share on other sites
ajit

This may be of some help.

WinSetOnTop ("title", "text", 1)

OR

Maybe

AdlibRegister("Activate_Window")

Func Activate_Window()

WinActivate ( "title" [, "text"] )

EndFunc

Regards

Ajit

Edited by ajit

Share this post


Link to post
Share on other sites
martin

I made a gui which shows the coordinates of the mouse. However, if I click on somewhere, it doesn't stay active. Is there a way to make the gui stay active even after clicking something else?

Do you mean that it no longer displays the mouse coordinates if another window takes focus?


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites
wolf9228

I made a gui which shows the coordinates of the mouse. However, if I click on somewhere, it doesn't stay active. Is there a way to make the gui stay active even after clicking something else?

exStyle

BitOR($WS_EX_TOPMOST,$WS_EX_WINDOWEDGE)

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
HotKeySet("{ESC}", "Terminate")

$GUI = GUICreate("My GUI", 421, 225, 163, 198, -1, BitOR($WS_EX_TOPMOST,$WS_EX_WINDOWEDGE))
GUISetState(@SW_SHOW)
While 1
If Not WinActive($GUI) Then WinActivate($GUI)
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
GUIDelete()
Exit

Func Terminate()
    Exit 0
EndFunc

صرح السماء كان هنا

 

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  

×