vb.net - Get file from "Windows Explorer - Open With" -


i'm not quite sure start this. on right-clicking on generic file in windows explorer (e.g. *.doc word document) 1 can choose "open with...". 'd know how program knows file has been "passed" (is right word?). done via arguments? how can implement in own application?

i tried manually adding file path arguments of 1 of applications when run, path includes spaces (which denotes new argument). how windows round this/what need solve this?

regards, robbie

to retrieve arguments used command line:

private sub form1_load(sender object, e system.eventargs) handles me.load     dim smsg string = ""     each sarg string in my.application.commandlineargs         smsg &= sarg & ": "     next     msgbox(smsg) end sub 

place code in winform _load, console main, etc.

if above run with: hello world command line hello: world: display.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -