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

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
digitsoft
Posts: 451
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

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

#1 Post by digitsoft »

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

User avatar
Auge_Ohr
Posts: 1405
Joined: Wed Feb 24, 2010 3:44 pm

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

#2 Post 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 5595 times
need Ot4xb
OT_TrayBal.zip
(5.34 KiB) Downloaded 264 times
greetings by OHR
Jimmy

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

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

#3 Post 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
The eXpress train is coming - and it has more cars.

User avatar
Auge_Ohr
Posts: 1405
Joined: Wed Feb 24, 2010 3:44 pm

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

#4 Post 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 236 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 ; 
greetings by OHR
Jimmy

User avatar
digitsoft
Posts: 451
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

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

#5 Post by digitsoft »

please review it does not let me download the files

Thanks
Nolberto Paulino
Regards

User avatar
slobodan1949
Posts: 80
Joined: Mon Apr 25, 2011 8:57 am
Location: SERBIA
Contact:

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

#6 Post 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

User avatar
Auge_Ohr
Posts: 1405
Joined: Wed Feb 24, 2010 3:44 pm

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

#7 Post 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
greetings by OHR
Jimmy

Post Reply