Solved

Close Windows

Posted on 1998-12-15
7
218 Views
Last Modified: 2010-04-04
hi

with the Winexec (and i tried with also a few others ...win api) i"m execute Application (in Dos mode)
after this application finished (and i"m see if also on the window caption) i want to close the windows
i try several ways like sending destroy/ Close Message (Send Message Api )etc . but still the windows isnt close
any one can help ?
please be very specific ... and if u have even example code u may send me : b_asi@inetr.net.il
10x in advance
Asi
0
Comment
Question by:asi
7 Comments
 
LVL 3

Expert Comment

by:williams2
ID: 1351172
..Let me say the same thing to you: Be specific. I hardly understand what your problem is about, you should provide an example or something to show what you want, if you have problems expressing yourself.

What do you mean by executing an application in DOS mode? And what has this to do with the window caption???

Regards,
Williams
0
 
LVL 3

Expert Comment

by:Matvey
ID: 1351173
First of all, try these components:

      http://bes.trendline.co.il/torry/vcl/system/appexec.zip 
      http://bes.trendline.co.il/torry/vcl/system/sfexec.zip 
      http://bes.trendline.co.il/torry/vcl/system/jgapprun.zip 
      http://bes.trendline.co.il/torry/vcl/system/execproc.zip 
      http://bes.trendline.co.il/torry/vcl/system/texec.zip 
      http://bes.trendline.co.il/torry/vcl/system/aapexec.zip 
      http://bes.trendline.co.il/torry/vcl/system/inoapex.zip (shareware)

They are easy to use and let you run and close applications among other things.
Now about DOS mode - there might be a problem if the program hasn't finished. In this case you might want to shut it down the "hard" way. Please see this question:

  http://www.experts-exchange.com/Q.10066757

--Matvey
0
 
LVL 1

Expert Comment

by:BlackDeath
ID: 1351174
i think he's got the following problem:

when you create a link to an application for ms-dos, dclick it and the app has run, the window remains open with the caption bar indicating "Beendet - xx.exe" (in german) or something like "Finished - xx.exe" (? i dunno how the english caption looks like). you can change this by setting the checkbox "Beim Beenden schließen" (in german) or something like "close when finished" (? same thing again: i've got only the german version of windows) in the programs tab of the properties sheet of the link.

and i think asi wants this close when finished being done by a statement in delphi.

if so, i dunno either how to do this - yet...

Black Death.
0
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 

Author Comment

by:asi
ID: 1351175
BlackDeath  u r right !

i already find it my self ... but change your comment to  answer and i'll give u the points ...

10x
Asi
0
 
LVL 1

Accepted Solution

by:
BlackDeath earned 20 total points
ID: 1351176
ok, i take this as an xmas-present.

btw: have you done it by api-call postmessage with message wm_close?

thx & merry xmas,

Black Death.
0
 
LVL 1

Expert Comment

by:BlackDeath
ID: 1351177
yah, this should be it (post-mortem-answer):

PostMessage(FindWindow(nil, 'Beendet - xx'), wm_Close, 0, 0);

Black Death.
0
 

Author Comment

by:asi
ID: 1351178
hi
i made it by executing the next line
Command /c xxx.exe

0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

832 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