Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Drag and Drop
#2
It's neither, you need to interpret command line args, and if the program sees more than just $0 then it will do something with $1, $2, $3, etc.. depending on how many command line args you gave it.

If you drag one file over the executable, the filepath will be the second command line arg.

Therefore the app starts up with the filepath being the executable location and filename with the extension, and then the filepath after it:

Code:
myprogram.exe "filepath of file you dropped here"

when you just click on a program binary to start the program, it looks something like:

Code:
myprogram.exe

With no arguments.

Count them, and if the total is greater than 2, then you know you've given input to command line arguments.
Reply


Messages In This Thread
Drag and Drop - by RANA - 06-03-2012, 12:22 PM
RE: Drag and Drop - by AceInfinity - 06-03-2012, 03:48 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)