C#: Drag & Drop File on .exe (icon) and get filepath -


i'm new c# , i'm not getting around trouble. here wanted achieve. whenever drag , drop file on .exe file (on icon itself), application should capture filepath of dragged file.

thanks.

if understand correctly, want drop file onto icon of exe, not application itself. if so, can achieved using parameters passed application. if check original boilerplate code when make console application has application entry point:

static void main(string[] args) 

if drag drop file onto icon of application, args[0] hold name of file being dropped. if goal drop file onto exe file, there numerous tutorials on that.


Comments

Popular posts from this blog

java - Incorrect order of records in M-M relationship in hibernate -

command line - Use qwinsta in PowerShell ISE -

ruby - Net::HTTP extremely slow responses for HTTPS requests -