Harbour Minigui

Tutorial


El Control IMAGE

El control Image permite mostrar imágenes desde archivos .bmp .ico .gif .jpg o .emf

@ 10,10 IMAGE Image_1 ;
    PICTURE 'Demo.Bmp' ;
    WIDTH 90 ;
    HEIGHT 90

#include "minigui.ch"

Function Main

    DEFINE WINDOW Win_1 ;
        AT 0,0 ;
        WIDTH 400 ;
        HEIGHT 200 ;
        TITLE 'Tutor 14 Image Test' ;
        MAIN

        DEFINE MAIN MENU
            POPUP "First Popup"
                ITEM 'Change Image Content' ACTION Win_1.Image_1.Picture := 'Open.Bmp'
                ITEM 'Retrieve Image Content' ACTION MsgInfo ( Win_1.Image_1.Picture)
            END POPUP
        END MENU

        @ 10,10 IMAGE Image_1 ;
            PICTURE 'Demo.Bmp' ;
            WIDTH 90 ;
            HEIGHT 90

    END WINDOW

    ACTIVATE WINDOW Win_1

Return


El Control ProgressBar

El control ProgressBar permite mostrar el estado de ejecución de una operación

@ 10,10 PROGRESSBAR Progress_1;
    RANGE 0 , 65535

#include "minigui.ch"

Function Main

    DEFINE WINDOW Win_1 ;
        AT 0,0 ;
        WIDTH 400;
        HEIGHT 200 ;
        TITLE 'Tutor 15 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

    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