Jump to content

Recommended Posts

Posted

#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

  • Moderators
  • Solution
Posted

computergroove,

Why would you expect GUICtrlSetState to work on a GUI? The WinSetOnTop function might be more useful. ;)

 

  Quote

How can I shorten it?

Use loops with a suitable algorithm to determine the coordinates. :)

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:

  Reveal hidden contents

 

Posted (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 by computergroove

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

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
  • Recently Browsing   0 members

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