Board index » delphi » Delphi: Making a shell-program
sve...@oslonett.no (Sven H. Enger)
![]() Delphi Developer |
Thu, 04 Dec 1997 03:00:00 GMT
|
sve...@oslonett.no (Sven H. Enger)
![]() Delphi Developer |
Thu, 04 Dec 1997 03:00:00 GMT
Delphi: Making a shell-program
Hello!
I want to make a program that executes an other program and pauses By using the function ExecuteFile(...) I can start an other program, Is there a kind of "modal"-function for a form? Could that be used? If there a way to find out what other programs are running at a given Greatfull for any answer; either to this group or by email! Sven H. Enger |
Michael J. Averbu
![]() Delphi Developer |
Fri, 05 Dec 1997 03:00:00 GMT
Re:Delphi: Making a shell-programIn a previous article, sve...@oslonett.no (Sven H. Enger) says: Quote>Hello! takes some Windows API calls, but it can be done. Here is how my program does it: 1) I disable the form (in this case, called OpeningScreen), by setting 2) Shell out to the program. 3a) If you didn't write the other program, but know it has a unique class while FindWindow(ClassName, nil) <> 0 do (DoEvents); ClassName is either a variable of PChar (array[0..n] of char) or The problem with that is, as I'm sort of new to Delphi, I don't 3b) If you wrote the other program, like I did, let the Delphi program procedure TOpeningScreen.TrapMessages(var Msg: TMsg; EndExec???Click reenables all of the buttons, and does a Hope that helps! |
Rafe Aldridg
![]() Delphi Developer |
Sat, 06 Dec 1997 03:00:00 GMT
Re:Delphi: Making a shell-programIn a previous article, sve...@oslonett.no (Sven H. Enger) says: Quote>Hello! Windows. It is available with full source via FTP with a filename something along the lines of INCTRL.ZIP. It was first published in PC Magazine July 1992 so is likely to exist in the PCMag area of your FTP site. Anyway, it contains code that does exactly what you request along with some Hope that helps, Rafe -- |
Jon Duerdo
![]() Delphi Developer |
Sat, 06 Dec 1997 03:00:00 GMT
Re:Delphi: Making a shell-programSven H. Enger (sve...@oslonett.no) wrote: : Hello! : I want to make a program that executes an other program and pauses : By using the function ExecuteFile(...) I can start an other program, : Is there a kind of "modal"-function for a form? Could that be used? : If there a way to find out what other programs are running at a given : Greatfull for any answer; either to this group or by email! : Sven H. Enger Here is a snippet of VB code that might help: Declare Function GetModuleUsage Lib "Kernel" (byVal hInst as Integer) as hInst = Shell(prog,7) ;similar to ExecuteFile?? End Sub Jon jon.duerd...@sheridanc.on.ca |
Fadi Kala
![]() Delphi Developer |
Mon, 08 Dec 1997 03:00:00 GMT
Re:Delphi: Making a shell-programQuoteJon Duerdoth (duerd...@hubble.sheridanc.on.ca) wrote: : : Hello! : : I want to make a program that executes an other program and pauses : : By using the function ExecuteFile(...) I can start an other program, : : Is there a kind of "modal"-function for a form? Could that be used? : : If there a way to find out what other programs are running at a given : : Greatfull for any answer; either to this group or by email! : : Sven H. Enger : Here is a snippet of VB code that might help: : Declare Function GetModuleUsage Lib "Kernel" (byVal hInst as Integer) as : hInst = Shell(prog,7) ;similar to ExecuteFile?? : End Sub : Jon Here is an idea, p.s., the callback function is (if I recall) CBTProc .. I hope this helps. If you still have doubt, e-mail me --Fadi |
i..
![]() Delphi Developer |
Tue, 16 Dec 1997 03:00:00 GMT
Re:Delphi: Making a shell-programmikea...@prairienet.org (Michael J. Averbuch) wrote: Quote>In a previous article, sve...@oslonett.no (Sven H. Enger) says: the task, so the way to do this is as follows: 1. Shell using WinExec 2. Loop until GetModuleUsage(module handle) = 0, calling HTH Ian |
horri..
![]() Delphi Developer |
Tue, 16 Dec 1997 03:00:00 GMT
Re:Delphi: Making a shell-programQuote>I want to make a program that executes an other program and pauses African Chief ! A trap for young players: the constant wm_quit seems not to be available under Delphi - I had to add it in by hand. const wm_quit = $0012; if not IsDialogMessage (0, Msg) then {////////// WinExec and Wait //////////////} Begin Repeat {$R *.DFM} procedure TSDIAppForm.SaveItemClick(Sender: TObject); {EFFECT OF ABOVE LINE: the Delphi program pauses until the DOS program end; |
1. Will Delphi 1.0 program be able to access databases made in delphi 2.0
2. DELPHI: Problems shelling to another program
3. Ho to end a home made Shell for windows
4. Making Delphi program re-entrant for win2000 AS terminal servr
5. A list of programs made with BP or Delphi, please
6. A list of programs made with BP or Delphi, please
7. Can a Delphi 5 made exe program run on a 486
8. Making a delphi program hidden from taskbar
9. DOS-SHELLING FROM A PAS-PROGRAM
10. Windows 3.x + 95 and BP7 DPMI programs with shelling give Exception 0E and other trouble