Sign in to follow this  
Followers 0
jgq85

Helping to make GUI Form AlwaysOnTop

4 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

Lifesaver; thanks very much

Share this post


Link to post
Share on other sites

Lifesaver; thanks very much

No that much :D You're welcome ;)

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
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
Sign in to follow this  
Followers 0