iB07 Posted June 17, 2013 Share Posted June 17, 2013 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 More sharing options...
Tekk Posted June 17, 2013 Share Posted June 17, 2013 Add this extended style to your GUI. Const $WS_EX_NOACTIVATE = 0x08000000 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 17, 2013 Moderators Share Posted June 17, 2013 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. M23 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Recommended Posts