Code: Select all | Expand
#include "fivewin.ch"
Function TestInvoice()
Local oDlg,oFont
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
DEFINE DIALOG oDlg SIZE 878, 570 PIXEL TRUEPIXEL RESIZABLE FONT oFont ;
TITLE "Services"
@ 10,10 button "test" SIZE 40,18 PIXEL;
ACTION MessageToast( 1, "Message Success Action",;
"c:\work\fwh\bitmaps\16x16\alert.bmp",;
400, 40, oDlg, CLR_GREEN, CLR_WHITE, ;
CLR_WHITE, , , , , , , .t.,-250, 100) OF oDLG
oDlg:aMinMaxInfo := { nil, nil, nil, nil, 878, 570, nil, nil } //878, 570
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
return nil
//--------------------------------------------------------------------//
Function MessageToast( nType, cText, cBmp, nWidth, nHeight, oWnd, nClrPane, nClrPane2, ;
nClrText, nLev, nTime, lUp, bRet, lLeftP, lAlert, lShadow,;
nOffY, nOffX, nFont )
local oTip
local bInit
DEFAULT lLeftP := .t.
DEFAULT lUp := .T.
DEFAULT nType := 1
DEFAULT lAlert := .F.
DEFAULT lShadow := .T.
DEFAULT nLev := 255
DEFAULT nTime := 4000
DEFAULT nOffY := 0
DEFAULT nOffX := 0
DEFAULT nFont := -12
/*
oTip := TToast():NewToast( nType, cText, cBmp,;
nWidth, nHeight, oWnd,;
nClrPane, nClrPane2, nClrText,;
nLev, nTime, lUp, , lLeftP,lAlert, lShadow,;
nOffY, nOffX, nFont)
*/
oTip := TToast():NewToast( nType, cText, cBmp, 400, 40, oWnd, ;
CLR_BLUE, , CLR_WHITE, nLev, nTime, lUp, , lLeftp, , , nOffY, nOffX )
oTip:nWRadio := 6
oTip:nHRadio := 6
oTip:lBtnClose := .f.
oTip:lBtnSetup := .f.
oTip:bValid := { || TipTransHide( oTip ), .T. }
oTip:ActivaAlert()
return nil
However, if you move the window or the dialog the toast is another window in itself and not related to the dialog instead
instead ttoast is an entity unrelated to the dialog and implies that if the dialog is enlarged the message created with the ttoast class will never be where you told him to stay