Sample program:
- Code: Select all Expand view
#include "fivewin.ch"
function Main()
local oWnd, aBmp, oFont
local cUrl := "http://i.telegraph.co.uk/multimedia/archive/02722/taj-mahal-deal_2722393b.jpg"
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-16
DEFINE WINDOW oWnd TITLE "BITMAPS LINKED TO URL"
oWnd:SetFont( oFont )
DEFINE BUTTONBAR oWnd:oBar OF ownd SIZE 64,80 2015
oWnd:oBar:bPainted := { || oWnd:oBar:SayText( ;
"All Images" + CRLF + "are directly" + CRLF + "from URL Links", ;
{ nil, nil, nil, -20 }, "R" ) }
DEFINE BUTTON OF oWnd:oBar PROMPT "Aries" ;
FILE "http://weknowyourdreamz.com/images/zodiac-01-aries-ram-icon.png"
DEFINE BUTTON OF oWnd:oBar PROMPT "Taurus" ;
FILE "http://weknowyourdreamz.com/images/zodiac-02-taurus-bull-icon.png"
DEFINE BUTTON OF oWnd:oBar PROMPT "Leo" ;
FILE "http://weknowyourdreamz.com/images/zodiac-05-leo-lion-icon.png"
aBmp := oWnd:ReadPalBmpEx( cUrl )
oWnd:nHeight := 600
oWnd:nWidth := 700
ACTIVATE WINDOW oWnd CENTERED ;
ON PAINT oWnd:SayPalBmp( aBmp, { oWnd:oBar:nHeight,nil,nil,nil } )
RELEASE FONT oFont
PalBmpFree( aBmp )
return nil
EXTERNAL TURL,TIPCLIENTHTTP