Finding A Selected File

How do you find out what file has been selected in Windows..?

For example if you right click on it and then its selected the file and then you run a program from the right click. How does the program know which file was right clicked on?

Comments

  • : How do you find out what file has been selected in Windows..?
    :
    : For example if you right click on it and then its selected the file and then you run a program from the right click. How does the program know which file was right clicked on?
    :
    The way the program finds the file is stored in the registry. This often is done using command-line parameters, for example:
    [code]
    notepad myworddoc.doc
    [/code]
    This will execute the notepad and it will open myworddoc.doc.
    You can access the command-line parameters from within your program by using the ParamCount() and ParamStr() functions.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion