Windows 7中,用Visual Studio開發WPF應用程式,實現從Windows Explorer中拖拽檔案到應用程式,始終顯示“無法拖放”符號問題解決方案

來源:互聯網
上載者:User

標籤:

Are you running your application or Visual Studio that hosts the app under administrative privilege?

If that‘s the case, the Windows prevents the drag drop operation from happening. In Windows 7 or Vista, an application with a lower security privilege (your Windows Explorer with normal user privilege) cannot send data to another one (your app or Visual Studio with administrative privilege) with a higher security privilege.

Try to do one of the followings:

Run your Visual Studio without administrative privilege. Run your application outside Visual Studio without administrative privilege. Enable and long on to the Administrator account in the OS. In this case, both your Windows Explorer and your Visual Studio will have administrative privileges.

 

Be aware of windows vista/windows 7 security rights - if you are running Visual Studio as administrator, you will not be able to drag files from a non-administrator explorer window into your program when you run it from within visual studio. The drag related events will not even fire! I hope this helps somebody else out there not waste hours of their life...

 

這是因為Windows 7的安全許可權限制,導致無法激發拖拽和拖放事件,解決方案為使用Administrator使用者登入,或者將Visual Studio的啟動使用權限設定為非管理員。

Windows 7中,用Visual Studio開發WPF應用程式,實現從Windows Explorer中拖拽檔案到應用程式,始終顯示“無法拖放”符號問題解決方案

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.