Modern & circular pop-up menu when right button mouse is clicked on a control.

xavier.batlle

Active member
Local time
Today, 20:11
Joined
Sep 1, 2023
Messages
266
This example shows how to create a modern, circular pop-up menu (like a "radial menu" or "pie menu") that appears when you right-click in your Microsoft Access form.

Instead of showing the usual boring grey rectangular menu that Access normally displays, it shows a nice round menu with several options arranged in a circle around the mouse cursor.

How it works for the user:​

  • You right-click on the button.
  • A beautiful circular menu instantly appears at the mouse position.
  • Each option is shown as a colored circle can contain:
    • An icon (picture)
    • A short text label (like "SAVE", "EDIT", "PRINT", etc.)
  • As you move the mouse over the different circles, the one you're pointing at gets highlighted (bigger and different color).
  • In the very center there's a CANCEL button.
  • When you click on any option (or the center Cancel), the menu disappears and runs the corresponding action.

Main features:​

  • You can easily define what options appear and what icons they use.
  • You can define the number of options, text & icons to display.
  • Optionally It includes a central "Cancel" button so the user can change their mind easily.
  • The menu stays open until the user clicks on an option or outside the menu.

Example:​

1774894383102.png

Known issues:​

The circles and text appeared smaller on some computers because the code used fixed pixel values everywhere, but Windows applies different DPI scaling (display scaling) on different machines. Fixed in ver. 10

After displaying the new menu, the form's default command bar also appears, so I created a custom one with only the text "menu". I haven't been able to hide the default MS Access form command bar. Fixed in ver. 11 by @unmateria
 

Attachments

Last edited:
This example shows how to create a modern, circular pop-up menu (like a "radial menu" or "pie menu") that appears when you right-click in your Microsoft Access form.

Instead of showing the usual boring grey rectangular menu that Access normally displays, it shows a nice round menu with several options arranged in a circle around the mouse cursor.

How it works for the user:​

  • You right-click on the button.
  • A beautiful circular menu instantly appears at the mouse position.
  • Each option is shown as a colored circle can contain:
    • An icon (picture)
    • A short text label (like "SAVE", "EDIT", "PRINT", etc.)
  • As you move the mouse over the different circles, the one you're pointing at gets highlighted (bigger and different color).
  • In the very center there's a CANCEL button.
  • When you click on any option (or the center Cancel), the menu disappears and runs the corresponding action.

Main features:​

  • You can easily define what options appear and what icons they use.
  • You can define the number of options, text & icons to display.
  • Optionally It includes a central "Cancel" button so the user can change their mind easily.
  • The menu stays open until the user clicks on an option or outside the menu.

Example:​

View attachment 123648

Known issue:​

After displaying the new menu, the form's default command bar also appears, so I created a custom one with only the text "menu". I haven't been able to hide the default MS Access form command bar.
1774960378983.png

I like the concept; unfortunately, i do not see the menu labels in full overlayed over the icon...
 
View attachment 123658
I like the concept; unfortunately, i do not see the menu labels in full overlayed over the icon...
Yes, you are right. Circles appeared smaller on some computers because the code used fixed pixel values everywhere, but Windows applies different DPI scaling (display scaling) on different machines. Now the code is DPI aware and this issue should be fixed in ver. 10.
 
Last edited:
Yes you are right. Circles appeared smaller on some computers because the code used fixed pixel values everywhere, but Windows applies different DPI scaling (display scaling) on different machines. Now the code is DPI aware and this issue should be fixed in ver. 10.
Works well now thankyou.
 
I like it! :) works great! :) just put ShortcutMenu = No and remove the MenuOptionsOnly on btundo :)
Thanks @unmateria. Your suggestion plus the modifications you have applied to the code has fixed the known issue! Now the default MS Access context menu is no longer displayed. I'm very grateful to you!
New version 11 uploaded!
 
Last edited:
almost similar to my demo:
 
you can also create same menu, using a form and command buttons and just make the form transparent.

also it would be challenging if you can show a semi-transparent circle with those menu buttons around, mimicking
most smartphones and other apps.

when you hover inside the circle menu, the transparency becomes less and when you leave, it re-instate it's semi-transparent effect.
same effect can be made to the menu buttons also.
that will make it really modern.

circle_menu.png
 
One should be careful with fancy controls unfamiliar to most users.
It is not about "see what I can", but what the user can accomplish fast and safely.
 
you can also create same menu, using a form and command buttons and just make the form transparent.

also it would be challenging if you can show a semi-transparent circle with those menu buttons around, mimicking
most smartphones and other apps.

when you hover inside the circle menu, the transparency becomes less and when you leave, it re-instate it's semi-transparent effect.
same effect can be made to the menu buttons also.
that will make it really modern.

View attachment 123668
Rust player, ehhhh?? hahahhaha :)
 
you can also create same menu, using a form and command buttons and just make the form transparent.

also it would be challenging if you can show a semi-transparent circle with those menu buttons around, mimicking
most smartphones and other apps.

when you hover inside the circle menu, the transparency becomes less and when you leave, it re-instate it's semi-transparent effect.
same effect can be made to the menu buttons also.
that will make it really modern.

View attachment 123668
It’s a bit ironic — right after I saw the original post, a Google advert popped up showing almost the exact same image you shared here. Coincidence or not, it gave me the same idea you described. I could put something like this together fairly easily using HTML and CSS, but doing it purely in VBA is outside my skill set.
 
It’s a bit ironic — right after I saw the original post, a Google advert popped up showing almost the exact same image you shared here. Coincidence or not, it gave me the same idea you described. I could put something like this together fairly easily using HTML and CSS, but doing it purely in VBA is outside my skill set.

I asked AI to change the code to a pie-slice menu, and after a few clicks, this is the result:

1775120445766.png
 

Attachments

Last edited:
the only thing left to do is it's responsiveness.
when you hover very fast, it somehow lose track of which
menu item to select (specially when the cursor is in the center of the pie).
 
I asked AI to change the code to a pie-slice menu, and after a few clicks, this is the result:

View attachment 123675

Yes. cool....

My only issue is the lag between hovering and colourisation which can be frustrating, but it works.
For this reason, if i want to get a smooth finish for anything graphical or animated i revert to JS especially now we have WebView2

 

Users who are viewing this thread

Back
Top Bottom