Solved

Close Windows

Posted on 1998-12-15
7
223 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Working with hours 3 74
How to debug For loops? 3 63
How to Get Images From Server to Client using App Tethering 1 41
migrate this code to work on android 1 32
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

733 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