Solved

Minimizing forms without borders

Posted on 1998-11-30
4
529 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

Suggested Solutions

Title # Comments Views Activity
Print Graphic and Text to Epson TM-T88v 12 537
Dev Express grid collapse 2 52
How to renew a Delphi rad-studio licence? 5 92
Firemonkey DbLookupComboBox equivalent ? 2 76
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…
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

740 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