Hi everybody
How can i show a jpg picture on the screen in a dialog winfow?
Without converting it to bmp.
And with an auto-adaptation (i am not sure from my english) of the size.
I need to show some echography picture in the form of my patient.
JPG to screen
Dear Patili,
I think it may help.
I think it may help.
Code: Select all
REDEFINE IMAGE oImg ID 11 OF oDlg SCROLL
oImg:Progress( .F. )
REDEFINE SBUTTON oBtn[1] ID 12 ;
PROMPT TE('àµçÁ¡Ãͺ','Stretch') ;
WHEN lGstPhoto ;
ACTION AjustaZoom( oImg ,"S" ) ;
COLOR {|oBtn| If( oBtn:lMouseOver, CLR_YELLOW, CLR_BLACK ) } ;
NOBORDER ;
TEXT ON_BOTTOM
REDEFINE SBUTTON oBtn[2] ID 13 ;
PROMPT TE('¢ÂÒÂ','Zoom In') ;
WHEN lGstPhoto ;
ACTION AjustaZoom( oImg ,"A" ) ;
COLOR {|oBtn| If( oBtn:lMouseOver, CLR_YELLOW, CLR_BLACK ) } ;
NOBORDER ;
TEXT ON_BOTTOM
REDEFINE SBUTTON oBtn[3] ID 14 ;
PROMPT TE('ÂèÍ','Zoom Out') ;
WHEN lGstPhoto ;
ACTION AjustaZoom( oImg ,"R" ) ;
COLOR {|oBtn| If( oBtn:lMouseOver, CLR_YELLOW, CLR_BLACK ) } ;
NOBORDER ;
TEXT ON_BOTTOM
*------------------------------------*
Function AjustaZoom(oBmp,cAccion)
local nZoom:=oBmp:Zoom()
do case
case cAccion == "S"
oBmp:lStretch := !oBmp:lStretch
oBmp:ScrollAdjust()
oBmp:Refresh( .T. )
case cAccion == "R"
if nZoom*10>=1
oBmp:lStretch := .F.
nZoom:=nZoom-(0.10)
oBmp:Zoom(nZoom)
oBmp:Refresh()
oBmp:ScrollAdjust()
endif
case cAccion == "A"
oBmp:lStretch := .F.
nZoom:=nZoom+0.10
oBmp:Zoom(nZoom)
oBmp:Refresh()
oBmp:ScrollAdjust()
endcase
return NIL
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact: