Solved

Code for starting a exe file from another

Posted on 1998-12-22
5
141 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

691 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