Simple Tutorial - 11 : Images

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
esgici
Posts: 4250
Joined: Wed Jul 30, 2008 9:17 pm
Location: iskenderun / Turkiye
Has thanked: 131 times
Been thanked: 42 times
Contact:

Simple Tutorial - 11 : Images

Post by esgici » Fri Aug 01, 2008 1:34 am

Simple tutorial based upon HMG Offical Tutorial for beginners.

Displaying Images (The IMAGE Control)


The IMAGE control allows to show image files in your program.

Code: Select all

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

Code: Select all

#include "minigui.ch"

Function Main

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

    CENTER   WINDOW Win_1
    ACTIVATE WINDOW Win_1

Return
Image


Regards

esgici
Viva INTERNATIONAL HMG :D

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest