JohnMcTon Posted December 5, 2012 Share Posted December 5, 2012 Hello I'm trying to put a gui with an edit box containing some text on top of another window - this was easy with WinSetOnTop() The window (right now) is just an edit box, showing me some useful information. What I want to do is show the text only -- is that possible? I tried with WinSetTrans() but then the whole window became invisible(including text). I want the text to remain visible - no window. Any help or ideas appreciated a lot. Thanks Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted December 5, 2012 Moderators Share Posted December 5, 2012 (edited) JohnMcTon, Welcome to the AutoIt forum. This might well be what you want: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WINAPI.au3> #include <SendMessage.au3> Global Const $SC_DRAGMOVE = 0xF012 HotKeySet("{ESC}", "_Exit") $hGUI = GUICreate("Test", 200, 200, -1, -1, $WS_POPUP, $WS_EX_LAYERED) GUISetBkColor(0xABCDEF) GUICtrlCreateLabel("Click on the text to drag this transparent GUI" & @CRLF & "Press ESC to exit", 10, 10) _WinAPI_SetLayeredWindowAttributes($hGUI, 0xABCDEF, 250) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_PRIMARYDOWN _SendMessage($hGUI, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0) EndSwitch WEnd Func _Exit() Exit EndFunc Any use? M23 Edited December 6, 2012 by Melba23 Added {} to HotKey declaration 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...
JohnMcTon Posted December 5, 2012 Author Share Posted December 5, 2012 I'm so glad to learn something new. Works perfectly, thank you! Link to comment Share on other sites More sharing options...
Gotemp Posted December 6, 2012 Share Posted December 6, 2012 Interesting, will be saving that code minus the mistake. =P Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted December 6, 2012 Moderators Share Posted December 6, 2012 Gotemp, Would you care to enlighten us about the mistake you found in that script? 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...
iamtheky Posted December 6, 2012 Share Posted December 6, 2012 (edited) No braces around ESC on your HotKey? Edited December 6, 2012 by boththose ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted December 6, 2012 Moderators Share Posted December 6, 2012 boththose, Good spot! 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...
Gotemp Posted December 6, 2012 Share Posted December 6, 2012 Yep that was it took me a whole two mins of "eh... WHY YOU NO WORK!!!" lol Link to comment Share on other sites More sharing options...
AutoBert Posted December 7, 2012 Share Posted December 7, 2012 There is no need for an HorKey because the GUI close on ESC on default AutoIt-settings. Only when disabled Opt("GUICloseOnESC",0) it's needed Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now