我正在尝试创建一个在托盘中运行的 C# 应用程序,我可以将文件放在它的图标上.有什么方法可以获取系统托盘图标上放置的文件的路径?System.Windows.Forms.NotifyIcon 没有任何与拖放相关的事件.
I am trying to create a C# application that runs in tray where I can drop files on it's icon. Is there any way to get the path of the file dropped on the System Tray icon? System.Windows.Forms.NotifyIcon does not have any events related to drag and drop.
不可能做到这一点,简单的方法.如果光标位于通知图标附近的特殊区域,您可以显示一个虚拟表单.dummy Form 可以获取被放置文件的文件路径.
it's not possible to do this, the easy way. You can show a dummy Form, if the cursor is in a special area near the notifyicon. The dummy Form can get the filepath of the droped file.
这篇关于在 C# 托盘中拖放 NotifyIcon的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!