Jump to content

Progress Bar Windows 7


Recommended Posts

This works on Windows 7 x86,x64, and 2008R2. Are you including ProgressConstants.au3?

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

Opt('GUIOnEventMode', 1)

$Form1 = GUICreate('Form1', 51, 241, -1, -1, $WS_POPUP, BitOR($WS_EX_TOPMOST, $WS_EX_WINDOWEDGE))
$Progress1 = GUICtrlCreateProgress(8, 16, 33, 209, $PBS_VERTICAL)
GUISetState(@SW_SHOW)

GUISetOnEvent($GUI_EVENT_CLOSE, '_Quit')

Local $Direction = 'Increase'
While 1
    Switch $Direction
        Case 'Increase'
            For $i = 0 To 100
                GUICtrlSetData($Progress1, $i)
                Sleep(10)
            Next
            $Direction = 'Decrease'
            Sleep(50)
        Case 'Decrease'
            For $i = 100 To 0 Step -1
                GUICtrlSetData($Progress1, $i)
                Sleep(1)
            Next
            $Direction = 'Increase'
    EndSwitch
WEnd

Func _Quit()
    Exit
EndFunc   ;==>_Quit

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...