paramstr() can't handle long filenames?
Posted on 1997-05-24
when using the paramstr() option for opening a file, it cannot handle long filenames. For example in explorer from windows and you doubleclick on a file then it starts the program but cannot load any file with a space.
and so refuses it to load in the edit field, I use richedit, and when I click a file it loads in the richedit field fine, but when the file contains a space it refuses to do so.
putting the file in brackets helps "this is a testfile.txt" from a commandline but this is not possible in explorer so what code does open and display long filenames correct?
The Code I use is as follows:
if ExtractFileName(ParamStr(1)) <> '' then
and Opencode relates to the Procedure Opencode...
What needs to be changed here.