#include "FiveWin.ch"
function Main()
LOCAL nSize, oWnd, oFont
nSize := ROUND( FSIZE( "C:\prova.bmp" ) / 1024, 0 )
DEFINE WINDOW oWnd FROM 1, 1 TO 20, 50 TITLE "Testing"
@ 10, 10 SAY ALLTRIM( STR( nSize ) ) + " KB" OF oWnd SIZE 60, 25 PIXEL COLOR "N/W*"
ACTIVATE WINDOW oWnd
return nil
#include "FiveWin.ch"
#include "constant.ch"
STATIC oSay[6],oChk[2]
STATIC cNameImage,dDateModImage,nSizeImage
STATIC oImage
Function TEST(cfile)
Local oDlg
Local oBar
Local nBottom := 35
Local nRight := 110
Local nWidth := Max( nRight * DLG_CHARPIX_W, 180 )
Local nHeight := nBottom * DLG_CHARPIX_H
LOCAL lSetAlpha := .t.
if ! Empty( cfile ) .and. File( cfile )
cNameImage:= cfile
ELSE
cNameImage:= Space(160)
nSizeImage:= 0
dDateModImage := ctod(" / / ")
ENDIF
DEFINE DIALOG oDlg SIZE nWidth, nHeight ;
TITLE "Immagine"
@ 0, 0 IMAGE oImage SIZE 350, 150 OF oDlg SCROLL
oImage:Progress( .f. )
@ 160,10 SAY oSay[1] PROMPT "Nome file :" of oDlg SIZE 50,10 PIXEL
@ 180,10 SAY oSay[2] PROMPT "Dimensioni :" of oDlg SIZE 50,10 PIXEL
@ 210,10 SAY oSay[3] PROMPT "Ultima modifica :" of oDlg SIZE 50,10 PIXEL
@ 160,60 SAY oSay[4] PROMPT cNameImage of oDlg SIZE 50,10 UPDATE PIXEL
@ 180,60 SAY oSay[5] PROMPT nSizeImage of oDlg SIZE 50,10 UPDATE PIXEL
@ 210,60 SAY oSay[6] PROMPT dDateModImage of oDlg SIZE 50,10 UPDATE PIXEL
@ 210,200 BUTTON OBTN PROMPT "SELECT IMAGE" SIZE 45,10 OF OdLG ACTION GetImage( oImage ) PIXEL
ACTIVATE DIALOG oDlg CENTERED
return nil
function GetImage( oImage )
local gcFile := cGetFile( "Bitmap (*.bmp)| *.bmp|" + ;
"DIB (*.dib)| *.dib|" + ;
"PCX (*.pcx)| *.pcx|" + ;
"JPEG (*.jpg)| *.jpg|" + ;
"GIF (*.gif)| *.gif|" + ;
"TARGA (*.tga)| *.tga|" + ;
"RLE (*.rle)| *.rle|" + ;
"All Files (*.*)| *.*" ;
,"Please select a image file", 4 )
if ! Empty( gcFile ) .and. File( gcFile )
oImage:LoadBmp( gcFile )
cNameImage := alltrim(gcFile)
nSize := ROUND( FSIZE( gcFile ) / 1024, 0 )
nSizeImage := ALLTRIM( STR( nSize ) ) + " KB"
dDateModImage := FDATE(gcFile)
oSay[4]:refresh()
oSay[5]:refresh()
oSay[6]:refresh()
endif
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 73 guests