pb-win-notify

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
deseven
Enthusiast
Enthusiast
Posts: 362
Joined: Wed Jan 12, 2011 3:48 pm
Location: Serbia
Contact:

pb-win-notify

Post by deseven »

My attempt to create a notification system.
Windows-only, as it's the only OS which doesn't have anything like that out of the box (at least before Windows 10).
I tried to keep it as simple and lightweight as possible.

screenshot
github
direct download

Feel free to contribute.
Last edited by deseven on Sun Aug 30, 2015 3:54 am, edited 2 times in total.
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5342
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: pb-win-notify

Post by Kwai chang caine »

Nice and good idea, thanks for sharing 8)
ImageThe happiness is a road...
Not a destination
User avatar
aaaaaaaargh
User
User
Posts: 55
Joined: Thu Jul 27, 2006 1:24 pm

Re: pb-win-notify

Post by aaaaaaaargh »

Cool , thanks for sharing this! :D
User avatar
falsam
Enthusiast
Enthusiast
Posts: 630
Joined: Wed Sep 21, 2011 9:11 am
Location: France
Contact:

Re: pb-win-notify

Post by falsam »

Thanks for sharing. I will follow this project. Add to Pure Basic Francophone community.

➽ Windows 11 64-bit - PB 6.0 x64 - AMD Ryzen 7 - NVIDIA GeForce GTX 1650 Ti

Sorry for my bad english and the Dunning–Kruger effect.
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: pb-win-notify

Post by IdeasVacuum »

Looks good! :mrgreen:

Replace SetWindowLong_ with SetWindowLongPtr_ (etc)

PB Blog Sept 2008 re 32bit v 64bit
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Little John
Addict
Addict
Posts: 4519
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: pb-win-notify

Post by Little John »

IdeasVacuum wrote:Replace SetWindowLong_ with SetWindowLongPtr_ (etc)

PB Blog Sept 2008 re 32bit v 64bit
Thanks for reminding me/us!
User avatar
deseven
Enthusiast
Enthusiast
Posts: 362
Joined: Wed Jan 12, 2011 3:48 pm
Location: Serbia
Contact:

Re: pb-win-notify

Post by deseven »

IdeasVacuum wrote:Replace SetWindowLong_ with SetWindowLongPtr_ (etc)
Thanks, fixed in rev.2
falsam wrote:Add to Pure Basic Francophone community.
Sorry, i don't use g+, if you want you can write the post yourself.
EDIT: ah, i see, you've already did that, ok then :)

Thanks for all kind words, hope someone will find it useful :)
User avatar
deseven
Enthusiast
Enthusiast
Posts: 362
Joined: Wed Jan 12, 2011 3:48 pm
Location: Serbia
Contact:

Re: pb-win-notify

Post by deseven »

Updated styling to look more like W10 notifications:

Image
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5342
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: pb-win-notify

Post by Kwai chang caine »

Works great, thanks :wink:
ImageThe happiness is a road...
Not a destination
User avatar
falsam
Enthusiast
Enthusiast
Posts: 630
Joined: Wed Sep 21, 2011 9:11 am
Location: France
Contact:

Re: pb-win-notify

Post by falsam »

Thanks deseven. I really like.

➽ Windows 11 64-bit - PB 6.0 x64 - AMD Ryzen 7 - NVIDIA GeForce GTX 1650 Ti

Sorry for my bad english and the Dunning–Kruger effect.
User avatar
deseven
Enthusiast
Enthusiast
Posts: 362
Joined: Wed Jan 12, 2011 3:48 pm
Location: Serbia
Contact:

Re: pb-win-notify

Post by deseven »

Thanks guys :)

Well, in revisions 4 & 5 i implemented onClick support. It means that now you're able to perform some actions when user clicked on the notification (simply close it or run some program, etc).

Other important stuff:
- notifications can be forced to stay forever if needed
- tunable constants in the main include file, so you can disable or enable animations or alter their times
- latter notifications will take place of the expired or closed ones (some sort of a queue)

And, of course, there are 2 new examples to help with all that new functionality.

That's it i think, i can't imagine anything else to implement.
User avatar
deseven
Enthusiast
Enthusiast
Posts: 362
Joined: Wed Jan 12, 2011 3:48 pm
Location: Serbia
Contact:

Re: pb-win-notify

Post by deseven »

Turned out that i still have things to do :)

In revisions 6-9 i improved notifications queue (notifications which don't have free space on the screen will be showed later), added support for the latest PB 5.40, reworked notification display and animation algorithms, should be faster and flicker-free now.
Also, the usage is simplified, no more CreateThread() calls.

There are, however, some changes in the constants. So if you used older revisions you should double-check that.
Poshu
Enthusiast
Enthusiast
Posts: 459
Joined: Tue Jan 25, 2005 7:01 pm
Location: Canada

Re: pb-win-notify

Post by Poshu »

This is a REALLY nice piece of code, I used it in my last project, thanks!
Poshu
Enthusiast
Enthusiast
Posts: 459
Joined: Tue Jan 25, 2005 7:01 pm
Location: Canada

Re: pb-win-notify

Post by Poshu »

I'm trying to learn to use git, and I thought it was a good idea to publish my changes on this projet:
_ module format
_ Notifications can be placed anywhere on the screen (it's a bit of an hack to keep the general api the same, see example-advanced.pb) :
Image

My fork : https://github.com/poshu/pb-win-notify/
And my pull request https://github.com/deseven/pb-win-notify/pulls
User avatar
bbanelli
Enthusiast
Enthusiast
Posts: 543
Joined: Tue May 28, 2013 10:51 pm
Location: Europe
Contact:

Re: pb-win-notify

Post by bbanelli »

@Poshu

Wow, this is really great piece of work, thank you so much!
"If you lie to the compiler, it will get its revenge."
Henry Spencer
https://www.pci-z.com/
Post Reply