Solved

Close Windows

Posted on 1998-12-15
7
216 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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 Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
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…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

930 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

16 Experts available now in Live!

Get 1:1 Help Now