Hack Forums
[C#] [C#] Drag and Run (Whatever its called) [TUT] - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [C#] [C#] Drag and Run (Whatever its called) [TUT] (/showthread.php?tid=760027)



[C#] Drag and Run (Whatever its called) [TUT] - xSilent - Oct 23, 2010

Example
[img]http://www.codemodtutorials.x10.mx/Untitled9.gif[/img]

Code
[Image: b3734183772224b4cd28e52342a357c9.png]
[Image: 4f368086ca1f537a01930ee00f8f1c40.png]

I know it sucks, but whatever.

Someone will find this useful.


Before some flaming starts or whatever, it gets the file paths. I was using Process.Start as an example.


* - ubbelol - Oct 23, 2010

You don't need the

Code
if(args.lengt < 2)

part, just foreach


* - xSilent - Oct 23, 2010

(Oct 23, 2010 02:47 AM)UbbeLoL Wrote:  You don't need the

Code
if(args.lengt < 2)

part, just foreach

Yeah, that was one of my add crap for no reason moments.


* - vbowner - Oct 23, 2010

Why that if you can only select them and press Enter?


* - xSilent - Oct 23, 2010

(Oct 23, 2010 03:41 AM)vbowner Wrote:  Why that if you can only select them and press Enter?

Here come these comments.

This is just an example. Drag and run can be used say if your app edits text or something like that, the user does not have to run the app to open the file. Instead they can drag and drop over it then it'll do whatever.


* - vbowner - Oct 23, 2010

(Oct 23, 2010 03:43 AM)xSilent Wrote:  Here come these comments.

This is just an example. Drag and run can be used say if your app edits text or something like that, the user does not have to run the app to open the file. Instead they can drag and drop over it then it'll do whatever.
oh ok..
Spoiler (Click to View)


* - Mr. Anderson - Oct 23, 2010

hehe, nice code. don't know what I'd use it for though :p


* - newbie223 - Oct 23, 2010

wasn;t this posted before?


* - Zer[o] - Oct 23, 2010

this is interesting, i have seen this before tho :)