Toast Notification's Utility

Ramón San Félix Ramón
CODE AUTHOR
Posts: 31
 10 months 3 weeks ago #510 by Ramón San Félix Ramón
Ramón San Félix Ramón replied the code: Toast Notification's Utility
Hola Marcelo,

Esta utilidad no usa ninguna librería .Net, usa declaración de funciones externas para manejar funciones de Windows.

Saludos.

Please Log in or Create an account to join the conversation.

Marcelo Gil
Posts: 8
 11 months 7 hours ago #509 by Marcelo Gil
Marcelo Gil replied the code: Toast Notification's Utility
Hola Ramon! como estas ?
Esta funcionalidad aplica para PB 2022 R2 ?
Entiendo que a partir de esta version de PB no se pueden utilizar DLL generadas en .net framework. (pasan a .net core)

Muchas gcs
Sldos

Please Log in or Create an account to join the conversation.

Ramón San Félix Ramón
CODE AUTHOR
Posts: 31
 1 year 1 week ago #505 by Ramón San Félix Ramón
Ramón San Félix Ramón replied the code: Toast Notification's Utility
With the example you sent me, I have passed the logic of the notification call to the w_open window, which is now the main one. So if you close the w_main window as soon as you press the test button, nothing happens.
Now in the w_main window, by pressing the test button we execute a global function to call the notification. With this global function we can easily call notifications from anywhere in the application.
In the global function we check that the w_open window exists and launch the notification, if it does not exist, we launch a messagebox instead of the notification.
That's more or less how I have it and it works well for me, w_open would be the main window in this case of the application.
I attach your modified example as indicated. (pb2022 R2 Build 2828)

This message has an attachment file.
Please log in or register to see it.

Please Log in or Create an account to join the conversation.

Sivaprakash BKR
Posts: 2
 1 year 1 week ago #504 by Sivaprakash BKR
Sivaprakash BKR replied the code: Toast Notification's Utility
Thanks Ramon for your reply. Let me be more clear.

When I close the second window, from which the notification has been calls, even before the notification disappears, it makes the first window also to close automatically, there by the application.

**********************
In my case, I have a function in the main window of the application that triggers the notification. Since this window is never closed, if the application is not closed there is no problem. In the closequery event of that window I have a code to remove the notification if it closes, so that there is no error.
**********************
It seems that the code in the closequery event is closing the active window. In my case, since I manually closed the notification calling window, the code is closing the current active window, which should not happen.

Attached is the slightly modified copy of the toast program (PB 2022 R2 build 2819). To test
1. Run the application
2. It opens a window with a button
3. Click the button
4. That opens your toast window
5. Click Test
6. It displays the toast
7. Even before the toast notification goes off, close your toast window
8. Now the first window will be active
9. Just wait. First window automatically gets closed, by that way the application.

This message has an attachment file.
Please log in or register to see it.

Please Log in or Create an account to join the conversation.