Forum > General

Loading a file accourding to the default program

(1/3) > >>

captian jaster:
How can I open a file with the default program it set to in windows..?(Hope I'm not being confusing.)  :(

exdatis:
uses
 ...process
.....
var
  my_pipe : TProcess;
begin
  //proccess
  my_pipe:=TProcess.Create(nil);
  my_pipe.CommandLine:=cmd_value+' my_file';('firefox my.html' :sample)
  my_pipe.Options:=[poUsePipes];
  my_pipe.Execute;
  my_pipe.Free;


p.s. work well(linux, win) ;)

theo:
http://lazarus-ccr.sourceforge.net/docs/lcl/lclintf/opendocument.html

captian jaster:

--- Quote from: theo on December 27, 2010, 11:52:47 am ---http://lazarus-ccr.sourceforge.net/docs/lcl/lclintf/opendocument.html

--- End quote ---
It wouldn't find the procedure..


--- Quote from: exdatis on December 27, 2010, 07:30:39 am ---uses
 ...process
.....
var
  my_pipe : TProcess;
begin
  //proccess
  my_pipe:=TProcess.Create(nil);
  my_pipe.CommandLine:=cmd_value+' my_file';('firefox my.html' :sample)
  my_pipe.Options:=[poUsePipes];
  my_pipe.Execute;
  my_pipe.Free;


p.s. work well(linux, win) ;)

--- End quote ---
It didn't find cmd_Value

theo:

--- Quote from: captain jaster on December 27, 2010, 08:55:39 pm ---It wouldn't find the procedure..
...
It didn't find cmd_Value

--- End quote ---

are you kidding us?  :D

Navigation

[0] Message Index

[#] Next page

Go to full version