Is there a way to clean the some items form the Windows Jump-List using C#?
(An applications Jump-List appears when you click right on the applications icon in the Windows 7 Taskbar.)
I would like to clean the menu items representing the recently closed files but I'd like to keep the other menu items.
For example I'd like to clean the items of Google Chromes recently closed websites under the headline "Recently closed". I'd also like to keep the application specific menu items under the headline "Tasks".
All the menu information is stored in some binary files in the directory "%LOCALAPPDATA%\Microsoft\Windows\Recent\CustomDestinations\".
It is possible to delete these files, but if I do so I not only delete the list of recently used files but I also delete the application specific menu items, too.
I'm looking for a way to find and clean the menu items representing the most recently used files for any applicatins Jump-List using C# code. Do you have any ideas?
Thanks for your help!
Maybe it is possible to user the Winodws API Code Pack for C#?
http://code.msdn.microsoft.com/WindowsAPICodePack
Related
Hi I am currently creating a C# windows program and I am trying to add a right-click menu to the desktop everything is being added to the registry correctly but when I right click the desktop it wont display all menu items on some, its like it has a limit on how many items are aloud is their a way to overcome this? BTW I am adding it all through RegistryKey.
here are some images of the problem...
as you can see it shows three Items but their should be more...
this one shows missing items in the third item
this is a pic of the registry items
any help on this matter will be appreciated, also I have tried to use sharpshell but have failed to get that working, I have limited knowledge of C# but I am learning and have not worked with C++.
Scenario
My current O.S. is Windows 8.1 x64, with plans to updgrade to Windows 10 x64 in the near future.
I frequently need to toggle between to show hidden files in explorer.
To solve this, I added a simple contextmenu item via registry, then when I do right click on the background of a folder I have my item that tooggles the hidden files visibility of Explorer.
Problem
Now I would like to make this functionality more accesible to avoid the need of that extra click to open the contextmenu. I would like to integrate the functionality as a shell extension to add a button near the default buttons that are at the bottom-right corner of each Explorer window:
Question
In C# or preferably VB.Net, and preferably using SharpShell library, how can I create a simple shell extension that adds a button with icon there?.
Note that when the button is clicked I need to have some kind of reference to identify the current Window on where I clicked the button.
Research
I've read all the official articles for beginners in this url below, however I didn't found any that talks about integrating an "addon" in Explorer (only about info tips).
Sharpshell - CodeProject
I know the existance of some expecific applications such as QTTabBar that adds functionalities in explorer such as menus and buttons via shell extension, It has a C# source code here and I'd anaylez it but it's a very huge VS solution and my main language is VB.Net, it's very unclear for me what the author do in the source code to add "addons" in the Explorer.
EDIT
AWM (Actual Window Manager) example of its Explorer integration:
QTTabBar's Explorer integration:
I have a desktop app which after taking input from the user displays a list of files and folder(using a ListBox).
I want that when the user right clicks on any item in the ListBox, the right click menu of windows explorer should display.
I know I will have to use P/Invoke for this, but I am unable to find any relevant information such as which dll I have to use or which function I have to call.
Can anybody help me with that?
So this question is very old but has no accepted answer. I dont think Visionstar understood the issue OP is having.
My understanding is that you have an application running, and you would like to add an option in the WINDOWS EXPLORER's right-click menu. Not in your own application's context menu.
I do not think you can achieve this within your own application, however, what you can do is add an item in the Windows explorer's context menu (nothing to do with your application, you can just do that in windows; see link below) that you can setup to call a little script you would make (literally a little batch file... but could be a .net app too). That little script can take care of warning you main application. By creating a text file, or json file in a hot folder, or some other mechanism you would have to come up with.
Adding an item in the windows' contextual menu:
How add context menu item to Windows Explorer for folders
If you need to deploy this to other PCs, you can make a add_menu.reg file to make it simpler. I'll let you Google that one, but I think it's as simpe as a right-click -> export key in your regedit.
You will need to code it yourself, there is no embedded way simply add a OS-Contextmenu to it,because you have programmed the listbox, so you have to append some contextmenu to the listitem-rightclicks
Here are examples/guidance for adding a context menu:
http://msdn.microsoft.com/en-us/library/aa984254%28v=vs.71%29.aspx
http://social.msdn.microsoft.com/Forums/windows/en-US/790cd8be-0ba8-4f10-95a8-c88f1023d6e7/how-can-i-create-a-rightclick-menu-i-c?forum=winforms
I have an application. I would like to add my particular items to the right-click application's taskbar menu via C#. I want to add both permanent items and temporary items.
If I haven't made you to understand, this is the menu I am talking about:
This feature is called a JumpList and is for Windows 7. It is part of the Microsoft API. How to use this with C# has been documented thoroughly here and here.
In order to be able to deal with Jumplist classes in Windows Forms, you'd have to include these DLLs (Microsoft.WindowsAPICodePack.dll and Microsoft.WindowsAPICodePack.Shell.dll) in your project. You can get them from this CodeProject project or you can download the Open source library from WindowsAPICodePack which includes the source code that can be used to access Windows 7 and Windows Vista features. You will need to add two usings at the top of your code:
using Microsoft.WindowsAPICodePack.Taskbar;
using Microsoft.WindowsAPICodePack.Shell;
Any Jumplist consists of categories and each category has its own Jumptasks. There are two types of Jumptasks supported till now by WindowsAPICodePack; the JumplistLink and JumplistSeperator. A Jumptask represents an action to be performed by the user like openning a new instance of the application or launching another program. These Jumptasks are grouped in categories called JumplistCustomCategories.
My question may be the repeated one here but even after googling i havn't got the solution yet.
I have added a shell context menu item for files i.e. when you right click on a file within explorer the menu shows my custom menu item.
I have used -
HKLM\Software\Classes*\shell\myappname
HKLM\Software\Classes*\shell\myappname\command
But what i am not able to do is to add a separator within that context menu.
I am using C# 2005 for creating my windows application.
Could someone help solve my problem.
Thanks for sharing your valuable time.
You'll need to create a shell context menu handler to take full control over the context menu content. You should not write this in C# until .NET 4.0 becomes widely available. For now you can use C++, this web page has an example. A wrapper is described here, no idea if it is any good.
Check out the following link: Extending Shortcut Menus
I think there is no keyword to add a separator but to create a new entry at the same level. The new set of entries will appear in a new group.