Comments (9)
I have just tested and confirmed this behaviour on Windows 8 - with IShellExtInit we don't get more than 16 items, seems to be an optimisation in windows.
from sharpshell.
More details:
http://msdn.microsoft.com/en-us/library/dd758093%28VS.85%29.aspx[^]
In Windows 7 and later, the number of items passed to a verb is limited to 16 when a shortcut menu is queried. The verb is then re-created and re-initialized with the full selection when that verb is invoked.
from sharpshell.
Hello, sorry, but reading the above I don't understand if it is currently possible with SharpShell to receive more than 16 files in a context menu. Please help.
from sharpshell.
It is possible, the only problem is that you only see 16 items when the verb is queried - once it verb is actually invoked you get the full set of items
from sharpshell.
Dave, thanks for the response. Unfortunately, in my tests, if there are more than 16 items selected in explorer, the click event handler is not called at all.
var tagItem = new ToolStripMenuItem { Text = stringaTag, Image = Icons.tag_16x16 };
tagItem.Click += (sender, e) =>
{
log("debug"); // NEVER GETS HERE if there are more than 16 items selected
};
menu.Items.Add(tagItem);
it works properly if you select fewer items.
Any suggestions? Thanks again.
from sharpshell.
Hi @seguso at the moment I'm flat out of suggestions, this has been an extremely problematic issue to fix, you could try looking at the links mentioned earlier in this thread and see if anything suggests itself to you. I'll try and build a test case around this soon but that will mean only that I can reproduce the problem more easily, not that I can necessarily fix it
from sharpshell.
A little bit of a necro-post, but take a look at this article.
https://www.sevenforums.com/tutorials/131470-context-menu-items-missing-fix-when-more-than-15-files-selected.html
from sharpshell.
Thanks @Miki101! Some notes from my own recent investigation. When running the 'Count Lines' sample on Windows 10, the handler is shown:
The handler is also called successfully with the correct set of files:
This is without:
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MultipleInvokePromptMinimum
set. However, I'm going to update the docs with the links to this article and the associated issue on MSDN before I close this. Thanks for letting me know @Miki101 !
from sharpshell.
Dave, thanks for the response. Unfortunately, in my tests, if there are more than 16 items selected in explorer, the click event handler is not called at all.
var tagItem = new ToolStripMenuItem { Text = stringaTag, Image = Icons.tag_16x16 };
tagItem.Click += (sender, e) =>
{
log("debug"); // NEVER GETS HERE if there are more than 16 items selected
};
menu.Items.Add(tagItem);it works properly if you select fewer items.
Any suggestions? Thanks again.
In the recent post I made as issue #353, I have cited what appears to me to be the very same problem as seguso mentioned back in Oct 2014. When I write my code to construct a collection of submenu items, I do get the onclick event, whereas seguso indicated that he never gets the call to his event handler. Sadly, when I get the call to my event handler it is the wrong submenu item! My nested menu is a hierarchy of folders that has hundreds of menu items. I choose a submenu which happens to be item 192 and the callback is sent to the event handler for submenu item number 10. It ends up looking to the end user like they clicked on the wrong menu item.
I can see that my code is invoked with 16 items on right mouse click and then my code is invoked with 20 items upon mouse click. There is actually no problem for me on that account. My issue is that the calling code (sharp shell) is telling me that someone clicked menu item number 10 when the user actually clicked item number 192. Can I get some help with this particular point either here or in issue #353?
from sharpshell.
Related Issues (20)
- Get existing thumbnail HOT 2
- SharpContextMenu still does not support shortcuts
- Context Menu Count Lines example won't show when trying with image files HOT 5
- Explorer eventually crashes after many manu items with images are poped
- Setting position of menu item in Context menu for Windows 11
- Prevent user go back to parent in explorer
- Creating folder in Windows Explorer like DropBox or OneDrive, Box etc
- Possible to hide items in existing shell context menu
- Nuget package is not updated since 3 years.
- doesnt work with windows 11 22624 HOT 7
- Feature: Custom archive file browsing within Explorer
- SRM gives weird results HOT 3
- Click handler is never invoked in shell context menu
- ServerRegistrationManager class not mentioned in docs/tutorials? HOT 2
- How to add Context Menu in Window 11?
- Question: How to get DesktopView to access and move desktop icons
- DeskBand is not working on Win 11 HOT 3
- Implentation of a custom option in the windows 11 root context menu
- Preview handler steals focus from Explorer window HOT 5
- ContextMenu crash when the second-level menu have icon
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sharpshell.