Solved

WinExec -  SW_ShowMinimized

Posted on 1997-06-10
4
2,038 Views
Last Modified: 2012-06-21
I must be getting tired....

I Launch an app (from Delphi 1) using WinExec and I specify SW_ShowMinimized for the visibility.  If the program is something like Notepad etc.. everything works OK, the app is minimized.  If I specify one of my Delphi apps, it is like SW_ShowNormal.  The new app doesn't minimize.  

What am I missing here ??
0
Comment
Question by:icampbe1
[X]
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
  • 2
4 Comments
 

Expert Comment

by:bsys
ID: 1336964
I don't have any Delphi IDE with me here but could it be that when you launch your proggy that the first form is set to normal because it is stated in the source that way??
0
 
LVL 2

Author Comment

by:icampbe1
ID: 1336965
No. I don't do anything to specifically keep the form at full size.  Send me a comment with a Delphi example.  I'm gonn reject this so I can get some other answers.

Thanks,

Ian C.

0
 
LVL 1

Accepted Solution

by:
buemoh earned 70 total points
ID: 1336966
Hallo icampbe1,

your problem is, that your programs, written with Delphi, don't recognize the SW_SHOWMINIMIZED, because each Delphi program has a hidden application window, which gets this information and not the shown form.

If you want, that your program should be minimized, then you've to set the main form window as minimized like this:

procedure TForm1.FormCreate( Sender : TObject );
begin
  ShowWindow( Handle, cmdShow );
end;

If now the application is called with SW_SHOWMINIMIZED then your form window recognize this and is shown minimized.

Hope, that's what you want.

Bye

Hartwig

-----------------------------------------------------------------------------------------------------
///\\\ Hartwig MOTAL ///\\\  e-mail: moh@bue.magwien.gv.at
 Weinberggasse 60/9/7, A-1190  Vienna/Austria/Europe

0
 
LVL 2

Author Comment

by:icampbe1
ID: 1336967
That is exactly what I wanted.  Note however that minimizing the form leaves the application still there.  I want the application to be iconic as well.  If I showform( application.handle, cmdshow ) as well, then I get two icons on the task bar.  But I can solve this.  Your answer is excellent.

Thanks,

Ian Campbell
Toronto.

0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

726 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