2010-02-28 59 views
2

可能重复:
How to pop-up the Windows context menu for a given file using Delphi?显示资源管理器菜单中的德尔福

你好。在Delphi中,我们可以使用TShellListView在Windows资源管理器等组件中显示文件。当我点击一个图标时,它会显示一个与Windows资源管理器相同的弹出式菜单。我可以自动显示相同的菜单而不使用TShellListView吗?

例子我会写一个函数,如:

ShowFileMenu('c:\ file.txt');

它会显示该文件的Windows资源管理器菜单。

谢谢。

+0

我确信有可能重新创建这种行为(有人为这些API调用编写了包装器),但这样做会是很多工作来创建和维护的。也许你可能在你要解决的规范中更明确(例如,你是否允许对第三方代码的依赖,或者你只是试图限制成本?)。 – Argalatyr 2010-02-28 17:00:02

+1

Duplicate:http://stackoverflow.com/questions/1581975/how-to-pop-up-the-windows-context-menu-for-a-given-file-using-delphi。另见:http://stackoverflow.com/questions/2040659/how-can-i-display-the-send-to-and-open-with-context-menus – 2010-02-28 18:55:54

回答