#include "fivewin.ch"
#include "Image.ch"
#include "ttitle.ch"
STATIC oWnd
FUNCTION MAIN()
LOCAL oBtn1, oBtn2
SET _3DLOOK ON
SetBalloon( .T. ) // Balloon shape required for tooltips
PUBLIC c_path := CURDRIVE() + ":\" + GETCURDIR()
PUBLIC nSWidth := GetSysMetrics(0), nSHeight := GetSysMetrics(1)
PUBLIC oSysfont1 := TFont():New( "Arial", 0, 16,.F.,.T., 0, 0, 0,.F.,.F.)
PUBLIC oHeadFont := TFont():New( "Arial",0 ,-22,.F.,.T.,0 ,0,0,.F.,.F.)
PUBLIC oTextFont := TFont():New( "Arial",0 ,-18,.F.,.T.,0 ,0,0,.F.,.F.)
DEFINE WINDOW oWnd ;
FROM 30, 30 TO 500, 700 PIXEL TITLE "Mesage and xBrowse"
SHOW_MSG(oWnd)
@ nSHeight - 160, nSWidth - 200 BTNBMP oBtn2 SIZE 150, 60 OF oWnd 2007 ;
FILENAME c_path + "\Bitmaps\quit.bmp" ;
LEFT ;
PROMPT " &Exit " ;
FONT oSysfont1 ;
ACTION oWnd:End()
oBtn2:lTransparent = .t.
oBtn2:cTooltip := { "Close" + CRLF + ;
"Message-test","Close Window", 1, CLR_BLACK, 14089979 }
ACTIVATE WINDOW oWnd MAXIMIZED ;
ON INIT WND_BRUSH( oWnd, "FANTASY3.JPG " )
oSysFont1:End()
CLOSE DATABASE
RETURN NIL
//-----------------
FUNCTION WND_BRUSH( cControl, cImage )
LOCAL hDC, oBrush
IF File( c_path + "\bitmaps\" + cImage )
DEFINE BRUSH oBrush FILE c_path + "\Bitmaps\" + cImage
SET BRUSH OF cControl TO oBrush
RELEASE BRUSH oBrush
ELSE
MsgAlert( "Cannot load : " + CRLF + ;
c_path + "\bitmaps\" + cDImage, "Error" )
ENDIF
RETURN NIL
// ----------------------
FUNCTION SHOW_MSG( oControl )
LOCAL oBar1
@ 60, 50 TITLE oBar1 SIZE 350, 250 OF oControl SHADOW BOTTOMRIGHT SHADOWSIZE 14
@ 15, 140 TITLETEXT oTitle OF oBar1 TEXT "About-message" FONT oHeadFont COLOR 65535
@ 52, 140 TITLETEXT oText1 OF oBar1 TEXT "New Line 1" FONT oTextFont COLOR 16776960
@ 85, 140 TITLETEXT oText2 OF oBar1 TEXT "Line 2" FONT oTextFont COLOR 16776960
@ 20, 20 TITLEIMG oBmp1 OF oBar1 BITMAP c_Path + "\Bitmaps\CLAUDIA1.BMP" SIZE 95, 120 ANIMA LEVEL 255 ;
ACTION ( NIL)
oBar1:lRound := .T.
oBar1:lBorder := .T.
oBar1:nClrLine1 := 255
IF FILE( c_Path + "\Bitmaps\FANTASY1.JPG" )
oBar1:aGrdBack := {}
DEFINE BRUSH oBrush FILENAME c_Path + "\Bitmaps\FANTASY1.JPG"
SET BRUSH OF oBar1 TO oBrush:Resized( 350, 250, 1 )
RELEASE BRUSH oBrush
ELSE
MsgAlert( "File : FANTASY1.JPG" + CRLF + ;
"does not exist" + CRLF + ;
"to create Brush !", "ATTENTION" )
ENDIF
@ 191, 291 BTNBMP oBtn OF oBar1 ;
SIZE 40, 45 PIXEL;
NOBORDER ;
PROMPT "&OK" ;
FILENAME c_path + "\Bitmaps\Btn1.bmp" ;
ACTION oWnd:End() ;
FONT oSysFont1 ;
CENTER
oBtn:lTransparent := .t.
oBtn:cToolTip = { "Close " + CRLF + "Message","Message End", 1, CLR_BLACK, 14089979 }
oBtn:SetColor( 0, )
RETURN( NIL )