Jump to content
Sign in to follow this  
shEiD

Keep transparent label on top

Recommended Posts

shEiD

Hi,

Is there any "simple" way to keep the label on top, while updating progress control underneath? It seems progress steals "top most" when updated:

#include <WindowsConstants.au3>
#include <StaticConstants.au3>
#include <GUIConstantsEx.au3>

$Gui = GUICreate('', 150, 20, -1, -1, $WS_POPUP)
$GcProgress = GUICtrlCreateProgress(0, 0, 150, 20)
$GcLabel = GUICtrlCreateLabel('progress', 0, 3, 150, 14, $SS_CENTER, $WS_EX_TOPMOST)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUISetState()

For $i = 1 To 100
    GUICtrlSetData($GcProgress, $i)
    Sleep(30)
Next
Sleep(1000)

Exit

I want only a small progress (hence popup window) to display packing/unpacking archive progress with archives name on top.

Share this post


Link to post
Share on other sites
Aceguy

this is the way i do it. yea its not got the fancy progress bar, but it doesnt flicker and it always stays on top... just remeber to update the progress bar first then the label....

#include <GUIConstants.au3>

$Form1 = GUICreate("Form1", 625, 445, 193, 125)

$Progress1 = GUICtrlCreateProgress(48, 88, 353, 65,Default)
GUICtrlSetColor(-1, 0x00FF00)

        DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle(-1), "wstr", " ", "wstr", " ")
        GUICtrlSetStyle(-1, 1)
$Label1 = GUICtrlCreateLabel("Label is on top", 80, 96, 116, 49)
    GUICtrlSetBkColor($Label1, $GUI_BKCOLOR_TRANSPARENT)


GUISetState(@SW_SHOW)

GUICtrlSetData($Progress1,0)
for $ct=0 to 100
    GUICtrlSetData($Progress1,$ct)
    GUICtrlSetData($Label1,"Label is on top "& $ct)
    sleep(50)
Next

sleep(2000)
Exit
Edited by Aceguy

Share this post


Link to post
Share on other sites
AlmarM

oh if any amins are reading this, anyway to get rid of my mass spammer status, i have had it since i 1st regiseterd...june 2006 :graduated:

My Settings -> Profile -> Member Title :(

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.