Solved

Minimizing forms without borders

Posted on 1998-11-30
4
531 Views
Last Modified: 2010-04-04
I have a form which has BorderStyle set to bsNone. When I call Minimize it minimizes to a little rectangle just above the start button. How do I make it minimize like normal forms? Is it perhaps some other property which is involved?
0
Comment
Question by:red_2
[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
4 Comments
 
LVL 4

Expert Comment

by:erajoj
ID: 1348611
Tried Application.Restore - Application.Minimize ?

/// John
0
 
LVL 20

Expert Comment

by:Madshi
ID: 1348612
Please try the following:

type
  TForm1 = class(TForm)
  private
    { Private-Deklarationen }
    procedure SysCommand     (var Message: TWMSYSCOMMAND);        message WM_SYSCOMMAND;
  end;


procedure TForm1.SysCommand(var Message: TWMSYSCOMMAND);
begin
  if Message.CmdType and $FFF0 = SC_MINIMIZE then begin
    ShowWindow(handle,SW_MINIMIZE);
  end else inherited;
end;

Don't know if it works. Haven't tested it. Just a try...

Regards, Madshi.
0
 

Expert Comment

by:elkiors
ID: 1348613
Surely only the Application.Mainform will minimize to the taskbar, all other forms are subforms that will only sit 'above' the status bar ie within the desktop area.

Darren

0
 
LVL 3

Accepted Solution

by:
williams2 earned 200 total points
ID: 1348614
This is the way Windows should normally be dealing with it. Try:

  WindowState:= wsMinimized;
  ShowWindow(Handle,SW_HIDE);

But the one you want is this:

  Application.Minimize;
  ShowWindow(Handle,SW_HIDE);


Try it with a button on a form with BorderStyle = bsNone.

/Williams
0

Featured Post

Independent Software Vendors: 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!

Question has a verified solution.

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

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…
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…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

689 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