Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

drag and drop on NotifyIcon in tray in C#

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.

like image 997
Gabriel Diaconescu Avatar asked Apr 30 '10 07:04

Gabriel Diaconescu


2 Answers

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.

like image 157
Werewolve Avatar answered Oct 01 '22 13:10

Werewolve


It has az example, but it's not fully and written in C++ :(

DragnDropOnTrayIcon

like image 43
Icebob Avatar answered Oct 01 '22 12:10

Icebob