LOCAL c_path := CURDRIVE() + ":\" + GETCURDIR()
@ 200, 15 BTNBMP oBtn1 OF oDlg PIXEL ;
SIZE 60, 30 ;
PROMPT "Msg &Error" FILE c_path + "\images\preview.bmp" 2007 ;
FONT oFont LEFT ;
ACTION MYMSGBOX( ;
"There is an error and the process could not be completed."+CRLF+"Please try it once again.", ;
150, ; // 2. Top ( centered Top and Left = 0 )
140, ; // 3. Left
{"&Close"}, ; // 4. aOptions
{"Exit16.bmp"}, ; // 5. aBmps
"Error Message", ; // 6. Title
"X", ; // 7. xIcon
, ; // 8. nDefault
, ; // 9. aGradient
"marble5.bmp", ; // 10. Bmp-brush
, ; // 11. bAction
, ; // 12. oFont
, ; // 13. cFileRes
oIcon1, ; // 14. oIcon
, ; // 15. uVar
, ; // 16. cPict,
, ; // 17. bValid
, ; // 18. lSpinner
, ; // 19. lMeter
, ; // 20. oMeter
, ; // 21. lCancel
CURDRIVE() + ":\" + GETCURDIR() )
..
..
ACTIVATE DIALOG oDlg ;
ON INIT ( DlgInit( oDlg, oFont, cMsg, nTop, nLeft, aOptions, cTitle, nDefault,;
aGradiate, bAction, xIcon, @uVar, cPict, bValid,;
lSpinner, lMeter, oMeter, @lCancel ), ;
IIF( EMPTY(cBrush), Gradiate(oDlg, aGradiate), ;
DrawBrush(oDlg, c_path + "\images\" + cBrush ) ) )
IF oIco # nil
RELEASE ICON oIco
ENDIF
RELEASE FONT oFont
RETURN oDlg:Cargo
// ---- BMP-Brush-function ---------
FUNCTION DrawBrush( oDlg, cBrush )
LOCAL oBrush
IF !FILE( cBrush )
MsgAlert( "File : " + cBrush + CRLF + ;
"does not exist to create" + CRLF + ;
"Brush-Background !", "ATTENTION" )
ELSE
DEFINE BRUSH oBrush FILENAME cBrush
oDlg:SetBrush( oBrush )
oBrush:End()
ENDIF
RETURN nil