Windows Notification Service

Windows Notification Service

Postby Natter » Tue Nov 23, 2021 10:15 am

Hi

Is it possible to use the Windows Notification Service via FW ?
Natter
 
Posts: 1120
Joined: Mon May 14, 2007 9:49 am

Re: Windows Notification Service

Postby cnavarro » Tue Nov 23, 2021 12:13 pm

Look and try

Code: Select all  Expand view

#define NIIF_NONE                      0x00000000
#define NIIF_INFO                      0x00000001
#define NIIF_WARNING                   0x00000002
#define NIIF_ERROR                     0x00000003
#define NIIF_USER                      0x00000004
#define NIIF_NOSOUND                   0x00000010
#define NIIF_LARGE_ICON                0x00000020
#define NIIF_RESPECT_QUIET_TIME        0x00000040
#define NIIF_ICON_MASK                 0x0000000F

#define NIM_ADD                        0x00000000
#define NIM_MODIFY                     0x00000001
#define NIM_DELETE                     0x00000002
#define NIM_SETFOCUS                   0x00000003
#define NIM_SETVERSION                 0x00000004

#define WIN_LR_DEFAULTSIZE             0x00000040
#define WIN_IMAGE_ICON                 0x00000001

//----------------------------------------------------------------------------//

function Main()

   local nUuid
   local cText  := "En un lugar de la Mancha de cuyo nombre no quiero acordarme, vivía un hidalgo caballero"
   
   nUuid := win_UuidCreateString()
   win_ShellNotifyIcon( , nUuid, 2, , , .F., , , , )
   win_ShellNotifyIcon( , nUuid, 0, , "My tooltip", .T., hb_AnsiToOem( cText ), 10000, "Title info", NIIF_WARNING + NIIF_RESPECT_QUIET_TIME )

return nil
 
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6501
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Windows Notification Service

Postby karinha » Tue Nov 23, 2021 12:37 pm

Para que version de windows esto funciona? En 7 de 32 bits no funciona.

1 => En xHarbour no compila.

2 => en Harbour compila, más no executa.

Que pasa? Gracias.

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7292
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Windows Notification Service

Postby cnavarro » Tue Nov 23, 2021 12:58 pm

Joao, lo has probado en Windows 10 ?

Image
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6501
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Windows Notification Service

Postby Natter » Tue Nov 23, 2021 1:19 pm

Thank you, Cristobal! This is what we need. At the same time, I will rebuild my program for Harbour. Is it possible to cause a full message window to appear (as if you click on the right button on the taskbar - Notifications)?
Natter
 
Posts: 1120
Joined: Mon May 14, 2007 9:49 am

Re: Windows Notification Service

Postby cnavarro » Tue Nov 23, 2021 1:23 pm

Natter wrote:Thank you, Cristobal! This is what we need. At the same time, I will rebuild my program for Harbour. Is it possible to cause a full message window to appear (as if you click on the right button on the taskbar - Notifications)?


I'm sorry, I don't quite understand what you need
Can you put an image or something that is more descriptive?
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6501
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Windows Notification Service

Postby Natter » Tue Nov 23, 2021 1:30 pm

I can't get a photo to match the message in any way :(
Natter
 
Posts: 1120
Joined: Mon May 14, 2007 9:49 am

Re: Windows Notification Service

Postby karinha » Tue Nov 23, 2021 1:31 pm

How a TrayIcon()? Type AVG anti virus messages? I didn't understand the issue either.

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7292
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Windows Notification Service

Postby cnavarro » Tue Nov 23, 2021 1:36 pm

Use the "Screen Clipping" utility from Windows 10 itself
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6501
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Windows Notification Service

Postby Natter » Tue Nov 23, 2021 1:51 pm

Thanks, I try !

Click on the message icon to open a large pop-up message window. The latest messages are visible in this window.(including "Title info"). I was talking about this window
Natter
 
Posts: 1120
Joined: Mon May 14, 2007 9:49 am

Re: Windows Notification Service

Postby cnavarro » Tue Nov 23, 2021 2:15 pm

Do you want to automatically open this window from Fivewin?
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6501
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Windows Notification Service

Postby Natter » Tue Nov 23, 2021 2:32 pm

Yes
Natter
 
Posts: 1120
Joined: Mon May 14, 2007 9:49 am

Re: Windows Notification Service

Postby Ariel » Tue Nov 23, 2021 10:27 pm

Gracias Cristobal!!!!

Excelente aporte!
Ariel
 
Posts: 374
Joined: Wed Nov 29, 2006 1:51 pm
Location: Rosario - Argentina

Re: Windows Notification Service

Postby horacio » Wed Nov 24, 2021 12:16 am

Excelente Cristobal! un gran aporte.

Saludos
horacio
 
Posts: 1358
Joined: Wed Jun 21, 2006 12:39 am
Location: Capital Federal Argentina


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 19 guests