Solved

ExecuteFile

Posted on 1997-06-26
8
711 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
 

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

867 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now