TIP: Click on subject to list as thread! ANSI
echo: delphi
to: ALL
from: JON HUNT
date: 1998-01-14 22:17:00
subject: ShellExecute

Hi All,
After struggling with the ShellExecute function, I ended up rewriting it
slightly.  Maybe someone else will find this useful, you will need to
add ShellApi to your "uses" list.  Maybe someone can improve it.
Bear with me here, as I am still learning this.
function ExecuteFile(const FileName, Params, DefaultDir: string;
  ShowCmd: Integer): THandle;
var
  zFileName, zParams, zDir: array[0..79] of Char;
begin
  Result := ShellExecute(Application.MainForm.Handle, nil,
    StrPCopy(zFileName, FileName), StrPCopy(zParams, Params),
    StrPCopy(zDir, DefaultDir), ShowCmd);
end;
Slan,
Jon
--- Terminate 5.00/Pro Support FREE2000 & FOTI
---------------
* Origin: Concilium Orb BBS - Irish Terminate Support (2:263/500.1)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.