Jump to content

Auto progress GUI


chun914
 Share

Recommended Posts

I set a always on top GUI that show progress ( program is running ) like below

( code copy from this forum)

$jj=0

                GUISetState(@SW_DISABLE, $mainwindow)
    
    $progressttt = GUICreate("Progress",210,33, 800,600,$WS_POPUP,$WS_EX_TRANSPARENT)
    $progressbar1 = GUICtrlCreateProgress (2,2,200,20,$PBS_SMOOTH)
    GUICtrlSetBkColor(-1,0xFFFFFF)
    GUICtrlSetColor(-1,0xff0000)
    GUISetState (@SW_SHOW)
    SetWindowPos($progressttt, $HWND_TOPMOST, 0, 0, 0, 0, BitOR($SWP_NOMOVE,$SWP_NOSIZE))   


        ;begin of code...

          IF $a = $b then
          .
          . 
          .
          endif




       ;when the program finish running


    SetWindowPos($progressttt, $HWND_NOTOPMOST, 0, 0, 0, 0, BitOR($SWP_NOMOVE,$SWP_NOSIZE))
    GUIDelete($progressttt)
    GUISetState(@SW_SHOW, $mainwindow)
    GUISetState(@SW_ENABLE, $mainwindow)

what i'm now doing is add the following code inside the code.

GUICtrlSetData ($progressbar1,$jj)
Sleep(20)
$jj += 1
if $jj = 100 then $jj = 0

is there any way i can keep the progressbar keep running with using this stupid method ?

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