computergroove Posted March 19, 2015 Share Posted March 19, 2015 expandcollapse popup#Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form 1", 377, 280, 192, 114) GUICtrlSetState($Form1,$GUI_ONTOP) $Input1 = GUICtrlCreateInput("0", 24, 40, 49, 21) $Input2 = GUICtrlCreateInput("0", 24, 72, 49, 21) $Input3 = GUICtrlCreateInput("0", 24, 104, 49, 21) $Input4 = GUICtrlCreateInput("0", 24, 136, 49, 21) $Input5 = GUICtrlCreateInput("0", 24, 168, 49, 21) $Input6 = GUICtrlCreateInput("0", 240, 40, 49, 21) $Input7 = GUICtrlCreateInput("0", 240, 72, 49, 21) $Input8 = GUICtrlCreateInput("0", 240, 104, 49, 21) $Input9 = GUICtrlCreateInput("0", 240, 136, 49, 21) $Input10 = GUICtrlCreateInput("0", 240, 168, 49, 21) $Label1 = GUICtrlCreateLabel("Option 1", 88, 40, 61, 24) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") $Label2 = GUICtrlCreateLabel("Option 2", 88, 72, 43, 24) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") $Label3 = GUICtrlCreateLabel("Option 3", 88, 104, 74, 24) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") $Label4 = GUICtrlCreateLabel("Option 4", 88, 136, 42, 24) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") $Label5 = GUICtrlCreateLabel("Option 5", 88, 168, 56, 24) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") $Label6 = GUICtrlCreateLabel("Option 6", 304, 40, 54, 24) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") $Label7 = GUICtrlCreateLabel("Option 7", 304, 72, 57, 24) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") $Label8 = GUICtrlCreateLabel("Option 8", 304, 104, 53, 24) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") $Label9 = GUICtrlCreateLabel("Option 9", 304, 136, 41, 24) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") $Label10 = GUICtrlCreateLabel("Option 10", 304, 168, 22, 24) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") $Label11 = GUICtrlCreateLabel("Pause Script", 144, 8, 98, 17) $Pause = GUICtrlCreateButton("Pause", 24, 216, 97, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Im trying to get this window to stay on top. GUICTRLSETSTATE doesn't seem to work or Im doing it wrong. Also at one point Melba23 replied to one of my posts and made code like the example above significantly shorter somehow. I made the above with Koda. How can I shorten it? Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html Link to comment Share on other sites More sharing options...
Moderators Solution Melba23 Posted March 19, 2015 Moderators Solution Share Posted March 19, 2015 computergroove,Why would you expect GUICtrlSetState to work on a GUI? The WinSetOnTop function might be more useful. How can I shorten it?Use loops with a suitable algorithm to determine the coordinates. 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...
jguinch Posted March 19, 2015 Share Posted March 19, 2015 (edited) Also, you can use the extended style $WS_EX_TOPMOST in your GUICreate() Edited March 19, 2015 by jguinch Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
computergroove Posted March 19, 2015 Author Share Posted March 19, 2015 (edited) For future reference $Form1 = GUICreate("Form 1", 377, 280, 192, 114) WinSetOnTop($Form1,"",1) Worked and $Form1 = GUICreate("Form 1", 377, 280, 192, 114,0,$WS_EX_TOPMOST) also worked Edited March 19, 2015 by computergroove VINAYAK_R_KADAM 1 Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html 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