Solved

Code for starting a exe file from another

Posted on 1998-12-22
5
135 Views
Last Modified: 2010-04-06
How do i do to start programs from my form.
I want to select a file with the fileopendialog and save it in the register.
start the new program and close the program where i initiated the startcommand.
0
Comment
Question by:samone
  • 3
  • 2
5 Comments
 

Accepted Solution

by:
Tulip earned 100 total points
ID: 1352582
Let's say you want to start the file "D:\example.exe"
Then this command should work:

ShellExecute(0, 'open', 'D:\example.exe', nil, nil, SW_SHOWNORMAL);

if you want to close the first app, just use the CLOSE command
after ShellExecute.
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1352583
Didn't you just copy and paste that code from the question i answered a little while ago?? or maybe not??

-Viktor
--Ivanov
0
 

Expert Comment

by:Tulip
ID: 1352584
No I didn't Viktor.
That command is so common, that not only you know it !


0
 

Expert Comment

by:Tulip
ID: 1352585
No I didn't Viktor.
That command is so basic, that not only you know it !


0
 
LVL 10

Expert Comment

by:viktornet
ID: 1352586
Sorry, I said or maybe not which means I wasn't sure and just asked u.... Anyway, Merry Christmas to all...

-Viktor
--Ivanov
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

747 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

13 Experts available now in Live!

Get 1:1 Help Now