Solved

ExecuteFile

Posted on 1997-06-26
8
718 Views
Last Modified: 2008-03-17
ExecuteFile wont work
It says it is an undeclared identifier
What do I need to do to fix this?
I'm using Delphi 3.
0
Comment
Question by:Evil
8 Comments
 

Author Comment

by:Evil
ID: 1337818
Edited text of question
0
 
LVL 3

Expert Comment

by:sperling
ID: 1337819
You need to add FMXUtils to your 'uses' clause. FMXUtils should be located somewhere in the demo subdirectory tree.

Regards,

Erik.
0
 
LVL 5

Expert Comment

by:ronit051397
ID: 1337820
on the directory
C:\Program Files\Borland\Delphi 3\Demos\DOC\FILMANEX
there is an example project of how to use ExecuteFile.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Expert Comment

by:dr_gonzo
ID: 1337821
Use
ShellExecute(handle, "explore", "path_to_folder", NULL, NULL, SW_SHOWNORMAL);

or why not

WinExec('myfile.exe', SW_SHOWNORMAL);
0
 

Author Comment

by:Evil
ID: 1337822
is there anyway to close the outside application?
0
 
LVL 5

Expert Comment

by:ronit051397
ID: 1337823
sendmessage([application handle or window handle],wm_close,0,0);
0
 

Author Comment

by:Evil
ID: 1337824
How do I know the Application handle or Window Handle?
0
 
LVL 3

Accepted Solution

by:
mirek071497 earned 50 total points
ID: 1337825
function FindWindow(Classname, WindowName: PChar): HWnd

if You need close You'r application then You know ClassName and WindowName.

this example find Progman handle

var
  a : array[0..40] of char
  h : thandle;
begin
   StrPCopy( a, 'Progman' );
   h := FindWindow( a, nil );
end;

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Printing problem 2 111
Error E2158 compiling with Delphi XE10 Seattle 2 127
Unique identifier on a terminal server (rdp) 4 75
Delphi android app hide keyboard 3 45
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question