Does anyone know how to create a microsoft-style notification message when an email arrives
Posted: Thu Dec 02, 2021 12:52 pm
Does anyone know how to create a microsoft-style notification message when an email arrives
Donnay Software Web Forums
http://donnay-software.com/DONNAY/
Code: Select all
METHOD IM:ShowNewUser( aUser )
LOCAL GetList[0], GetOptions
@ 2,0 DCSAY aUser[11] FONT '10.Arial Bold' COLOR GRA_CLR_YELLOW
@ 3,0 DCSAY 'has come on line' COLOR GRA_CLR_YELLOW
DCGETOPTIONS COLOR GRA_CLR_DARKCYAN SAYWIDTH 0 ;
WINDOWROW -300 WINDOWCOL -300 HIDE
DCREAD GUI FIT TIMEOUT 5 ;
NOAUTORESTORE ;
TITLE 'IM Alert' ;
BUTTONS DCGUI_BUTTON_OK ;
OPTIONS GetOptions ;
EVAL {|o|DC_SetWindowTransparency(o:getHwnd(),100), ;
Sleep(1), ;
o:show(), ;
o:setPos({0,-1*o:currentSize()[2]}), ;
ShowNewUserWindow(o)}
RETURN nil
* -------------
METHOD IM:GroupList()
LOCAL cGroupList, i
IF Empty(::hosts[::server,IM_USERGROUPLIST])
cGroupList := 'ALL'
ELSE
cGroupList := ''
FOR i := 1 TO Len(::hosts[::server,IM_USERGROUPLIST])
cGroupList += ::hosts[::server,IM_USERGROUPLIST,i] + ;
IIF(i<Len(::hosts[::server,IM_USERGROUPLIST]),',','')
NEXT
ENDIF
RETURN cGroupList
* ------------
STATIC FUNCTION ShowNewUserWindow( oDlg )
LOCAL i, nHeight := oDlg:currentSize()[2], nHandle, nTransparency
nHandle := oDlg:getHwnd()
FOR i := 1 TO nHeight STEP 5
Sleep(5)
oDlg:setPos({oDlg:currentPos()[1],oDlg:currentPos()[2]+5})
nTransparency := Int(100-i)
IF nTransparency > 0
DC_SetWindowTransparency(nHandle,nTransparency)
ENDIF
oDlg:setSize({oDlg:currentSize()[1]+2,oDlg:currentSize()[2]})
NEXT
DC_SetWindowTransparency(nHandle,0)
RETURN nil
Code: Select all
#define NIF_INFO 0x00000010
#define WIN_NIIF_USER 0x00000004
Code: Select all
X:\exp20\Source\Taskbar\
Code: Select all
// old
tnid.uFlags = NIF_MESSAGE | NIF_ICON | NIF_TIP;
Code: Select all
// new
tnid.uFlags = NIF_INFO | NIF_ICON | NIF_TIP;
tnid.dwInfoFlags = NIIF_INFO ;