久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

如何在C#中顯示文件的系統(tǒng)菜單

How to show system menu of a file in C#(如何在C#中顯示文件的系統(tǒng)菜單)
本文介紹了如何在C#中顯示文件的系統(tǒng)菜單的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

我需要在我的應(yīng)用程序中顯示文件的系統(tǒng)菜單.此菜單與圖像相同.

I need to show system menu of a file in my application. This menu same as the image.

而且,我還想在這個(gè)菜單中添加一個(gè)我的菜單元素.

And, I also want to add a my menu element to this menu.

我該怎么辦?

謝謝

推薦答案

您要查找的內(nèi)容稱為 shell 上下文菜單.要在您的應(yīng)用程序中顯示這樣的菜單,您必須調(diào)用 Windows API.這一點(diǎn)都不容易,但幸運(yùn)的是,其他人已經(jīng)嘗試了它.

What you're looking for is called a shell context menu. To display such a menu in your application, you'll have to call the Windows API. This is not at all easy, but fortunately for you some other people have taken a stab at it.

CodeProject 上的 C# 文件瀏覽器 有一個(gè) shell 上下文菜單,在那篇文章中也有描述.

The C# File Browser on CodeProject has a shell context menu, which is also described in that article.

然后 Andreas Johansson 從該項(xiàng)目中提取 shell 上下文菜單代碼并將其上傳為一個(gè)單獨(dú)的 ZIP 文件,您可以此處下載.

Then Andreas Johansson extracted the shell context menu code from that project and uploaded it as a separate ZIP file, which you can download here.

我不知道如何使用它,甚至不知道它是否有效.這留給讀者作為練習(xí).但是如果你深入研究代碼,你可以從中學(xué)到很多東西.

I have no idea how to use it, or even if it works. That's left as an exercise for the reader. But there is a lot you can learn from this if you dig into the code.

這篇關(guān)于如何在C#中顯示文件的系統(tǒng)菜單的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

LINQ to SQL and Concurrency Issues(LINQ to SQL 和并發(fā)問題)
Yield return from a try/catch block(try/catch 塊的收益回報(bào))
Should I call Parameters.Clear when reusing a SqlCommand with a transation?(重用帶有事務(wù)的 SqlCommand 時(shí),我應(yīng)該調(diào)用 Parameters.Clear 嗎?)
what does a using statement without variable do when disposing?(處理時(shí)不帶變量的 using 語句有什么作用?)
Why doesn#39;t TransactionScope work with Entity Framework?(為什么 TransactionScope 不適用于實(shí)體框架?)
How to dispose TransactionScope in cancelable async/await?(如何在可取消的 async/await 中處理 TransactionScope?)
主站蜘蛛池模板: 国产精品一码二码三码在线 | 一级片视频免费 | 日韩av.com | 免费一二区 | 久久神马 | 欧美午夜激情在线 | 免费同性女女aaa免费网站 | www.夜夜骑.com | 男女污污网站 | 一级黄色短片 | 一区二区精品 | 成人黄色在线视频 | 91在线一区 | 在线播放中文字幕 | 一区二区三区视频在线观看 | 欧美激情视频一区二区三区免费 | 在线成人 | 久久精品16 | 国产一区免费 | 国产一区二区在线观看视频 | 成人教育av | 久久这里只有精品首页 | 亚洲高清在线 | 成人3d动漫一区二区三区91 | 国产日韩久久 | 久久久在线视频 | 国产精品久久国产精品 | 国产免费一区二区三区 | 国产一区二区三区 | 在线黄| 九九热热九九 | 国产精品久久久久久久久久了 | 欧美精品在线播放 | 国产精品毛片av一区 | 岛国av免费观看 | 国产毛片久久久 | 亚洲成人动漫在线观看 | 日韩在线不卡视频 | 国产二区av | 在线亚洲免费视频 | 精精国产xxxx视频在线野外 |