Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 11th, 2006, 12:39 PM   #1
vangelis
Newbie
 
vangelis's Avatar
 
Join Date: Mar 2006
Posts: 7
Rep Power: 0 vangelis is on a distinguished road
Wink needy

hi! if anybody able to put this on Delphi for me don't hesitate :banana: tanx

{$M $4000,0,0 } { 16K stack, no heap }
uses Crt,Dos;
var
ProgramName, CmdLine: string;
begin
ProgramName:='app.exe';
CmdLine:='';
delay(2000);
SwapVectors;
Exec(ProgramName, CmdLine);
SwapVectors;
end.
vangelis is offline   Reply With Quote
Old Mar 11th, 2006, 12:51 PM   #2
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Intended for new members:
Forum rules/FAQ
How to post a question
How to ask questions the smart way
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Mar 11th, 2006, 5:57 PM   #3
Polyphemus_
Expert Programmer
 
Polyphemus_'s Avatar
 
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4 Polyphemus_ is on a distinguished road
IOW (In Other Words):
1. use code tags
2. describe your problem carefully
Polyphemus_ is offline   Reply With Quote
Old Mar 12th, 2006, 2:05 AM   #4
vangelis
Newbie
 
vangelis's Avatar
 
Join Date: Mar 2006
Posts: 7
Rep Power: 0 vangelis is on a distinguished road
Delphi functions

In other words,i need the syntax in Delphi for a function that calls an external program(executable) and a second function to give my program a short delay in execution.tanx :banana:
vangelis is offline   Reply With Quote
Old Mar 22nd, 2006, 2:08 PM   #5
bgeraghty
Newbie
 
Join Date: Mar 2006
Posts: 15
Rep Power: 0 bgeraghty is on a distinguished road
Go to msdn.microsoft.com and search these terms [and read what comes up for each]:

for calling an external program...
ShellExecute()
WinExec()
CreateProcess()

and for the delay...
Sleep()

Side Note: for the delay you could also use a TTimer Component in delphi.
bgeraghty is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:24 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC