Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 01-20-2001, 07:32 AM
elif elif is offline
Junior Member
 
Join Date: Jan 2001
Posts: 8
Default External program calls

Hi!
Do you know how can I call
a program for example Outlook
from my application
Can you help me!
Thanks
Reply With Quote
  #2  
Old 01-20-2001, 07:56 AM
Claude Claude is offline
Senior Member
 
Join Date: Jan 2001
Posts: 178
Default RE: External program calls

You can call any application from your program with the Windows API function ShellExecute.

Now, if you want to start AND control Outlook, you better go with the servers components that come with Delphi 5. The TOutlookApplication component will do the job very well.
Reply With Quote
  #3  
Old 01-20-2001, 09:21 AM
jamessturrock jamessturrock is offline
Senior Member
 
Join Date: Jan 2001
Posts: 170
Default RE: RE: External program calls

YOU MUST PUT shellapi in the uses;

this code will open config.sys up in notepad and is the size normal.

ShellExecute(Handle,'open',
'notepad','c:\config.sys','',SW_SHOWNORMAL);

hope that is what u need
James Sturrock
Reply With Quote
  #4  
Old 01-20-2001, 04:18 PM
Wise Guy Wise Guy is offline
Member
 
Join Date: Jan 2001
Posts: 45
Default RE: External program calls

Hey!

You can always execute an external program by one of sample code lines below:

uses shellapi;

Shellexecute(handle,'open','notepad.exe','',nil,sw _shownormal);

or
other

WinExec('C:\Windows\notepad.exe',SW_Show);

If you need a way to execute a .LNK file (a standart Windows link then you have to use the code below):

Note that is executes a link from the Windows Start Menu

uses ShellApi;

procedure TForm1.Button1Click(Sender: TObject);
begin
ShellExecute(0, nil, 'C:\WINDOWS\START MENU\DELPHI\Delphi3.lnk', nil, nil, SW_SHOWNORMAL);
end;

Good Luck!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 08:10 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.