Adding badges over the Access taskbar icon

KitaYama

Well-known member
Local time
Today, 16:53
Joined
Jan 6, 2022
Messages
2,373
This is an extension to @xavier.batlle's remarkable post here.
The post is in the "Sample Databases" subforum.
I didn’t post this reply there because adding non-essential replies would make the thread unnecessarily long and harder to follow for those who access it later.

xavier.batlle said:
This code allows you to place a small status icon (e.g., a red circle, a green check, or a number icon) over your Access taskbar button. It also allows to create and display dynamic images (using GDI+) over the taskbar button.
Some examples:
@xavier.batlle Thanks for sharing the database. I’ve wanted to do something like that for a long time, but with my limited knowledge I didn’t even know where to start. Now I have a complete working solution sitting in my archive.

Just wanted to mention that it behaves a bit strangely on multi-monitor setups (at least on two of my PCs).
I have three different databases open on three monitors, with monitor 2 (the middle one) set as the default.
I’m running your shared app on the left monitor.

Left monitor (showing sample file)Middle monitor (database 1)Right Monitor (Database 2)
Clicking Create Badge From IconShows icon badgeDoesn't show any BadgeShows icon Badge
Clicking Create Text BadgeShows text badgeShows Icon BadgeShows text badge
Clicking Clear BadgeHides BadgeShows text BadgeHides Badge
Clicking Clear Badge one more timeHides BadgeHides BadgeHides Badge
Clicking any of right side 10 buttonsShows Badge and after finishing, Hides the badgeShows Badge but after finishing, Badge stays visible.Shows Badge and after finishing, Hides the badge

Thanks again for sharing. I used a part of it in my app.
 
Last edited:
This is an extension to @xavier.batlle's remarkable post here.
The post is in the "Sample Databases" subforum.
I didn’t post this reply there because adding non-essential replies would make the thread unnecessarily long and harder to follow for those who access it later.


@xavier.batlle Thanks for sharing the database. I’ve wanted to do something like that for a long time, but with my limited knowledge I didn’t even know where to start. Now I have a complete working solution sitting in my archive.

Just wanted to mention that it behaves a bit strangely on multi-monitor setups (at least on two of my PCs).
I have three different databases open on three monitors, with monitor 2 (the middle one) set as the default.
I’m running your shared app on the left monitor.

Left monitor (showing sample file)Middle monitor (database 1)Right Monitor (Database 2)
Clicking Create Badge From IconShows icon badgeDoesn't show any BadgeShows icon Badge
Clicking Create Text BadgeShows text badgeShows Icon BadgeShows text badge
Clicking Clear BadgeHides BadgeShows text BadgeHides Badge
Clicking Clear Badge one more timeHides BadgeHides BadgeHides Badge
Clicking any of right side 10 buttonsShows Badge and after finishing, Hides the badgeShows Badge but after finishing, Badge stays visible.Shows Badge and after finishing, Hides the badge

Thanks again for sharing. I used a part of it in my app.
Hi @KitaYama ,

According to my tests if there are several front ends opened on the same computer, each one must have its own taskbar button, if they are stacked on the same taskbar button it doesn't work properly. I hope this helps.

I've only tested it on two monitors with no issues:
1772786293433.png
 
Hi @KitaYama ,

According to my tests if there are several front ends opened on the same computer, each one must have its own taskbar button, if they are stacked on the same taskbar button it doesn't work properly. I hope this helps.

I've only tested it on two monitors with no issues:
View attachment 123406
If you have tested on two monitors, why you have two icons on the same taskbar?
In windows 11, if you open two database and move one of them to another monitor, each monitor's taskbar shows only one icon (the one that's located on that monitor)
 
On a further note, If I open only two database on two monitors, still I see the same result in my #1 post.
Your sample is on left monitor, another db on middle (main) monitor.
The main monitor's icon is one step behind.
 
If you have tested on two monitors, why you have two icons on the same taskbar?
In windows 11, if you open two database and move one of them to another monitor, each monitor's taskbar shows only one icon (the one that's located on that monitor)
I'll try to explain but it's not easy for me.
By default, when you open several databases, they are stacked on the same taskbar button.
Example of two MS Access instances on the same tasbar button (Bad!):
1772787655819.png


You have to manage to open every MS Access front end on a different Taskbar button, for example: assigning a different application name and Application icon as I have shown before:
1772788168345.png

I you don't do that, the code won't work properly.
To sum up:
If you don't have a different taskbar button for each Front end database, the code doesn't work as espected.
It doesn't matter if you change a database from one monitor to another if they share the same taskbar button.
 
If you don't have a different taskbar button for each Front end database,
I'm terribly sorry, but I don't understand what you mean by your explanation.
I simply double click 3 different databases from Desktop, and move them to one of my monitors. Windows 11 gives me one Access buttons on each monitor's taskbar.
In Windows 11, you can not have two files from the same application opened on different monitors, yet having their icons on the same taskbar.

But if you think that behavior is how it's expected then I'm OK.
Thanks again for sharing the sample database.
Cheers and have a good day.

PS: If your database is on main monitor and another two databases on side monitors, it works perfectly. It seams that in my case, the problem occurs if the sample database is not on the main monitor.
 

Users who are viewing this thread

Back
Top Bottom