Jump to content

Gui Progress Bar Wont Show Up


Recommended Posts

Okay, I have read and searched and cant find anything on this. Does anyone know how to get the GUI progress bar to show up? Here's what I have:

GuiCreate("Test", 400, 400, -1, -1)

$TestBar = GuiSetControl("progress", "", 10, 10, 300, 20)
GuiSetControlEx($TestBar, 50)

GuiShow()
WinActivate("Test")
WinWaitClose("Test")

Now if I do this:

MsgBox(0,0, GuiRead($TestBar))

it returns "50", from the value i set in GuiSetControlEx, but I dont see the damn bar in my window anywhere.

Any ideas? Anyone got this to work?

Link to comment
Share on other sites

@chkaotic: If you use version "16" then you have this current problem.

If you use version "15" then it should work.

Or you wait until "jpm" has finished the new version 17, but I don't know what date it is.

Temporary you could solve it like this:

GuiCreate("Test", 400, 400, -1, -1)
Global $WS_VISIBLE = 268435456
Global $WS_CHILD = 1073741824
$TestBar = GuiSetControl("progress", "", 10, 10, 300, 20,$WS_CHILD + $WS_VISIBLE,0)
GuiSetControlEx($TestBar, 50)
GuiShow()
WinActivate("Test")
WinWaitClose("Test")

Regards Holger

Edited by Holger
Link to comment
Share on other sites

Thanks, I moved to v 15 and it worked. Going to make sure the rest of my code works in 15 and if so i'll just stick to it for now.

Now i got another question:

How do you Hide/Show a progress bar? Since $GUI_HIDE and $GUI_SHOW are states, and the state for a progress bar is how muc hits filled, is it possible to hide/show a progress bar?

If not, is it possible to re-set the coordinates of an active control? Kinda like GuiSetCoord() but on a control that already exists? Hence I would create the progress bar and set it to coords that are off-screen, and when I want to "un-hide" it, id reset the coords again.

Any thoughts?

Edited by chkaotic
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...