Jump to content

Helping to make GUI Form AlwaysOnTop


jgq85
 Share

Recommended Posts

I've tried adding $WS_EX_TOPMOST to my au3 script but the form doesn't appear to stay on top.

Does anyone know what else I can try?

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
#include <ImageSearch.au3>

#Region ### START Koda GUI section ### Form=H:\Scripts\AutoIt\AppSupportAssetURLTool_1-0.kxf

MsgBox(0, "Click the Comments Tab", "Click, then Hover mouse over, Comments Tab")
Sleep(3000)
Local $CommenTab = MouseGetPos()

MsgBox(0, "Hover mouse over Add Comment Button", "Hover mouse over Add Comment Button")
Sleep(3000)
Local $AddComment = MouseGetPos()

MsgBox(0, "Hover mouse over Multi-Edit Menu", "Hover mouse over Multi-Edit Menu")
Sleep(3000)
Local $MultiEditLink = MouseGetPos()



$Form1_1 = GUICreate("App Support Asset URL Tool 1.0", 266, 151, 192, 114, $WS_EX_TOPMOST)
GUISetBkColor(0x000000)
$Btn_MakeLink = GUICtrlCreateButton("Make Link", 40, 8, 185, 25)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFFFF00)
GUICtrlSetBkColor(-1, 0x0000FF)
$Btn_MultiEdit = GUICtrlCreateButton("Multi-Edit", 40, 40, 185, 25)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, 0x00FF00)
$Btn_Calibrate = GUICtrlCreateButton("Calibrate", 40, 73, 185, 25)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFF00FF)
GUICtrlSetBkColor(-1, 0xFFFF00)
$Btn_RandomVideo = GUICtrlCreateButton("Random Video", 40, 106, 185, 25)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xC0C0C0)
GUICtrlSetBkColor(-1, 0x800080)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###


While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit

Case $Btn_MakeLink
MouseClick("left", $CommenTab[0], $CommenTab[1], 1)

EndSwitch

WEnd
Edited by jgq85
Link to comment
Share on other sites

Hi,

$WS_EX_TOPMOST is an exstyle and can not be used as a style, you set it in the style parameter for the function GUICreate which is wrong.

Here you go :

GUICreate("App Support Asset URL Tool 1.0", 266, 151, 192, 114, -1, $WS_EX_TOPMOST)

Br, FireFox.

Edited by FireFox
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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