Page 1 of 1

Does anyone know how to create a microsoft-style notification message when an email arrives

Posted: Thu Dec 02, 2021 12:52 pm
by digitsoft
Does anyone know how to create a microsoft-style notification message when an email arrives

Re: Does anyone know how to create a microsoft-style notification message when an email arrives

Posted: Thu Dec 02, 2021 2:52 pm
by Auge_Ohr
hi,
digitsoft wrote: Thu Dec 02, 2021 12:52 pm Does anyone know how to create a microsoft-style notification message when an email arrives
do you mean this
TrayBall.jpg
TrayBall.jpg (11.26 KiB) Viewed 10698 times
need Ot4xb
OT_TrayBal.zip
(5.34 KiB) Downloaded 635 times

Re: Does anyone know how to create a microsoft-style notification message when an email arrives

Posted: Thu Dec 02, 2021 4:10 pm
by rdonnay
This code causes a notification window to slide up from the bottom of the screen.
It is used in the eXpress++ IM system (IMCLIENT20.PRG) when a new user comes on line.

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

Re: Does anyone know how to create a microsoft-style notification message when an email arrives

Posted: Thu Dec 02, 2021 6:19 pm
by Auge_Ohr
hi,

that "Tray-Ballon" is from Shell_NotifyIcon API which can put a Icon into Tray-Area
https://docs.microsoft.com/en-us/window ... otifyicona

you can put your Email-App into Tray-Area and "fly-out" Message when new Email arrive
here Original TaskBarIcon.zip
TaskBarIcon.zip
need Ot4xb
(5.61 KiB) Downloaded 550 times
i have modify Demo Source to use

Code: Select all

#define NIF_INFO            0x00000010
#define WIN_NIIF_USER       0x00000004
to show "that" Style

---

under Express++ you will find

Code: Select all

   X:\exp20\Source\Taskbar\
Sample from Thomas Braun use "C"-Code for Xbase++ (seems for v1.82, 1.9x, 2.0 )

to get "Tray-Ballon" Style replace NIF_MESSAGE with NIF_INFO

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 ; 

Re: Does anyone know how to create a microsoft-style notification message when an email arrives

Posted: Thu Dec 02, 2021 6:50 pm
by digitsoft
please review it does not let me download the files

Thanks

Re: Does anyone know how to create a microsoft-style notification message when an email arrives

Posted: Sun Dec 26, 2021 10:06 am
by slobodan1949
Dear Auge_Ohr,
Is there a rebus solution for downloading files:
OT_TrayBal.zip
TaskBarIcon.zip

do you mean this
TrayBall.jpg
TrayBall.jpg (11.26 KiB) Viewed 290 times
need Ot4xb
OT_TrayBal.zip
(5.34 KiB) Downloaded 36 times


you can put your Email-App into Tray-Area and "fly-out" Message when new Email arrive
here Original TaskBarIcon.zip
TaskBarIcon.zip
need Ot4xb
(5.61 KiB) Downloaded 33 times
i have modify Demo Source to use

Re: Does anyone know how to create a microsoft-style notification message when an email arrives

Posted: Sun Dec 26, 2021 4:52 pm
by Auge_Ohr
hi,

you can tray to get Files from
http://news.xb2.net/ng.php?search_txt=& ... 4xb.public

to access OT4Xb Forum