[Lazarus] Cross platform 'open file with default program'

Luiz Americo Pereira Camara luizmed at oi.com.br
Sun Jan 24 21:16:43 CET 2010

Juha Manninen escreveu:
> Hello.
>> Under Linux with distros supporting the freedesktop.org standards you
>> can execute the 'xdg-open' command. This will use the mime-type and
>> the each users preference on that system. This works for URL's too.
> Great! For Windows you can use a wrapper for ShellExecute function. I copied 
> my code below.

Thanks. I'm using your code with one modification: instead of 
Application handle i'm using hInstance so i can call before main form is 
created (e.g: a login dialog)


More information about the Lazarus mailing list