Solved

Close Windows

Posted on 1998-12-15
7
214 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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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 demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

762 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

20 Experts available now in Live!

Get 1:1 Help Now