Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Close Windows

Posted on 1998-12-15
7
220 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
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.

 

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi TcxGrid group footer summary 3 314
Best Firemonkey component pack 1 116
Firemonkey android show image from resource ? 1 46
Wincontrol not (correctly) drawn 15 40
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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

792 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