![]() |
Languages »
C# »
Utilities
Intermediate
License: The Code Project Open License (CPOL)
Explorer Shell Context MenuBy Jpmon1Add the Windows Explorer Shell Context Menu to your application |
C# (C# 1.0, C# 2.0, C# 3.0), .NET (.NET 2.0), Dev, Design
|
|
Advanced Search Add to IE Search |
|
|
|
||||||||||||||||
I am currently working on an Advanced text editor, and I was looking for a way to implement the Window's shell context menu in my code. I came across Andreas Johansson's WebLog which provided me with the answer. He took some of the code that Steven Roebert created and placed it in one file for ease of use. His code had several errors that were easily corrected, and now I am posting the finished product.
The code is pretty straightforward to use:
ShellContextMenu class. ShowContextMenu method with the proper arguments.
FileInfo/DirectoryInfo Array - A list of files/directories that need the Context Menu Point - Point to Display Context Menu // Sample code
ShellContextMenu ctxMnu = new ShellContextMenu();
FileInfo[] arrFI = new FileInfo[1];
arrFI[0] = new FileInfo(this.treeMain.SelectedNode.Tag.ToString());
ctxMnu.ShowContextMenu(arrFI, this.PointToScreen(new Point(e.X, e.Y)));
| You must Sign In to use this message board. | |||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||
General
News
Question
Answer
Joke
Rant
Admin
|
PermaLink |
Privacy |
Terms of Use
Last Updated: 27 May 2008 Editor: Deeksha Shenoy |
Copyright 2007 by Jpmon1 Everything else Copyright © CodeProject, 1999-2009 Web15 | Advertise on the Code Project |