Opening file with double click

BlitzPlus Forums/BlitzPlus Programming/Opening file with double click

MattVonFat(Posted 2005) [#1]
Now this was a hard topic to give a title to. I know this has probably been answered before but how do i get my program to open when a file associated to it is double clicked? Also how does my program know to open that file?


EOF(Posted 2005) [#2]
You want the CommandLine$() function.

This will return the path+filename of the file opened.


Example

BlitzPlus program
Notify CommandLine$()
End


Saved as TEST.EXE


File assocated with TEST.EXE

myfile.tst

Saved in C:\TEMP

Double-Clicking myfile.tst would cause the example TEST.EXE to produce:

C:\TEMP\myfile.tst