//----------------------------------------------------------------------------//
Function HazAlert204( oWnd, nType )
local oTip
local bInit
local cText
local cBmp := "..\bitmaps\16x16\alert.bmp"
local lLeft := .T.
local lUp := .T.
DEFAULT nType := 1
// oTip := TToast():NewToast( nToast, cText, cBmp, nWidth, nHeight, oWnd, nClrPane, ;
// nClrPane2, nClrText, nLev, nTime, lUp, bRet, lLeft )
cText := "Message Success Action"
oTip := TToast():NewToast( nType, cText, cBmp, 400, 40, oWnd, ;
CLR_BLUE, , CLR_WHITE, 255, 4000, !lUp, , lLeft )
oTip:nWRadio := 6
oTip:nHRadio := 6
oTip:ActivaAlert( oWnd )
Syswait( 1.0 )
cText := "Message Error Action"
oTip := TToast():NewToast( nType, cText, cBmp, 400, 40, oWnd, ;
CLR_RED, , CLR_WHITE, 255, 4000, !lUp, , !lLeft )
oTip:nWRadio := 6
oTip:nHRadio := 6
oTip:ActivaAlert( oWnd )
Syswait( 1.0 )
cText := "Message Attention User"
oTip := TToast():NewToast( nType, cText, cBmp, 400, 40, oWnd, ;
CLR_HBLUE, , CLR_WHITE, 255, 4000, lUp, , !lLeft )
oTip:nWRadio := 6
oTip:nHRadio := 6
oTip:lBtnClose := .F.
oTip:lBtnSetup := .F.
oTip:ActivaAlert( oWnd )
Syswait( 1.0 )
cText := "Message Received"
oTip := TToast():NewToast( nType, cText, cBmp, 400, 40, oWnd, ;
CLR_GREEN, , CLR_WHITE, 255, 4000, lUp, , lLeft )
oTip:nWRadio := 6
oTip:nHRadio := 6
oTip:lBtnClose := .F.
oTip:lBtnSetup := .F.
//oTip:bValid := { || TipTransHide( oTip ), .T. } // Only Hide slowly
oTip:bValid := { || TipTransFlicker( oTip ), .T. } // Flicker slowly at end
oTip:ActivaAlert( oWnd )
Return oTip
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
#define LWA_ALPHA 2
//----------------------------------------------------------------------------//
static function TipTransFlicker( oObj )
TipTransHide( oObj )
TipTransShow( oObj )
TipTransHide( oObj )
return NIL
//----------------------------------------------------------------------------//
static function TipTransHide( oObj )
local x
for x = oObj:nLevel to 0 step -1
SetLayeredWindowAttributes( oObj:hWnd, , x, LWA_ALPHA )
SysWait( 0.0003 )
next x
return NIL
//----------------------------------------------------------------------------//
static function TipTransShow( oObj )
local x
for x = 1 to oObj:nLevel
SetLayeredWindowAttributes( oObj:hWnd, , x, LWA_ALPHA )
SysWait( 0.0003 )
next x
return NIL
//----------------------------------------------------------------------------//