Simple Tutorial - 12 : Showing Progress

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Simple Tutorial - 12 : Showing Progress

Post by esgici »

Simple tutorial based upon HMG Offical Tutorial for beginners.

Showing Progress


The PROGRESSBAR control allows to show the completion status of an operation.

Code: Select all

 @ 10,10 PROGRESSBAR Progress_1 ;
        RANGE 0 , 65535

Code: Select all

#include "minigui.ch"

Function Main

    DEFINE WINDOW Win_1 ;
        AT 0,0 ;
        WIDTH 400 ;
        HEIGHT 200 ;
        TITLE 'Progressbar Test' ;
        MAIN

        DEFINE MAIN MENU
           POPUP "First Popup"
             ITEM 'ProgressBar Test' ACTION  DoTest()
           END POPUP
        END MENU

        @ 10,10 PROGRESSBAR Progress_1 ;
            RANGE 0 , 65535

    END WINDOW
   
    CENTER   WINDOW Win_1
    ACTIVATE WINDOW Win_1

Return

Procedure DoTest()
Local i

    For i = 0 To 65535 Step 25
        Win_1.Progress_1.Value := i
    Next i

Return
Image

Regards

esgici
Viva INTERNATIONAL HMG :D
Post Reply