Jump to content

gui shownoactivate + NOT ACTIVATABLE by clicks?


iB07
 Share

Recommended Posts

hey guys,

i want to print text on the screen, while an other window is active. so i managed to get close to my goal by using a "GUISetState(@SW_SHOWNOACTIVATE)"

but there is one thing not going as i wish:

when i accidentaly click the label it gets activated, which i dont want, because i want the other window to stay active at any time...

 

so i need something to display my var on top of everything, but it should be NOT ACTIVATABLE

 

here is an example, when you click the green label, which displays the text, it gets activated (what i DONT want):

(press END to exit)

#include <GUIConstantsEx.au3>

Opt("GUIResizeMode",$GUI_DOCKALL)

Global $DisplayText = "!!!!!!!!!!!!!!!!!!! TEXT TO DISPLAY !!!!!!!!!!!!!!!!!!!     'END' -> exit"
$X=800
$Y=50

HotKeySet("{END}", "Leave")

CreateDisplay()
while 1
   WinSetOnTop($GUI4LABEL,"",1)
   Sleep(100)
wend

Func CreateDisplay()
   Global $GUI4LABEL = GUICreate("Display", 200, 200, 800, 3, 0x80000000, 128);$WS_POPUP = 0x80000000, $WS_EX_TOOLWINDOW = 128
    GUISetBkColor(0xADFF2F)
    ;Create Label with text
    Global $Label = GUICtrlCreateLabel($DisplayText, 3, 3)    
    $cgp = ControlGetPos($GUI4LABEL, "", $Label);get label size
    WinMove($GUI4LABEL, "", $X, $Y, $cgp[2], $cgp[3]);form gui perfectly
    ;Show no activate
    GUISetState(@SW_SHOWNOACTIVATE) 
 EndFunc

Func Leave()
    Exit
EndFunc

i hope anyone of you got my intention and can help me, since im really stuck there

it would be possible to disable clicks while the gui is active, or when the gui is active ->WinActivate($mymainwindow)...

but that is not the smart way imo. it would be better to not even let the text/label/gui activate.

 

so is there any smart solution to print text on screen which will not activate when u click it????

 

regards,

iB07

Link to comment
Share on other sites

  • Moderators

iB07,

I see you did not read the Forum rules to which you were referred very carefully - you missed the part that says:

 

"Do not repost the same question if the previous thread has been locked - particularly if you merely reword the question to get around one of the prohibitions listed above"

Do NOT start another thread on this - our patience has limits. :naughty:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...