• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 267
  • Last Modified:

Minimizing a form

Hi Expert
With D5 I have lost the possibility to minimize the form without showing the animated window going down on the taskbar.
How Can I minimize my form without showing that animation ?
Can you understand me ?
Thank you.
0
borgo
Asked:
borgo
1 Solution
 
intheCommented:
heh note also that calling Application.Minimize from a modal form does not work anymore in d5 ..
0
 
kifahCommented:
Hi

ShowWindow(Form1.Handle, SW_HIDE);

Best Regards
0
 
craig_capelCommented:
also, in delphi 4, application.restore; does not work, i had to do a showwindow(form1.handle,sw_restore) have inprise neglected this basic workings of a form?
0
[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

 
borgoAuthor Commented:
Sorry but don't work
0
 
borgoAuthor Commented:
Madshi wrote:

Add this to your form:

  private
    procedure SysCommand(var Message: TWMSYSCOMMAND); message WM_SYSCOMMAND;

procedure TForm1.SysCommand(var Message: TWMSYSCOMMAND);
begin
  if Message.CmdType and $FFF0 = SC_MINIMIZE then begin
    Message.result:=0;
    Hide;
  end else inherited;
end;

And this work fine !!!
Thank you again Madshi.

Andrea.
0
 
MadshiCommented:
Hmmm... Where did I post that? Can't remember...   :-)

Well, but that isn't the answer to your problem, is it?
0
 
borgoAuthor Commented:
Hi Madshi

Yes I use it to hide my form without showing the minimizing animation.
Any other good solutions are welcome :-)
0
 
MadshiCommented:
Hmm... In the moment I have no other idea...
0
 
borgoAuthor Commented:
Ok, please Madshi reply for the points, the answer is one of yours.
Bye.

0
 
MadshiCommented:
Okay, thank you...   :-)

Regards, Madshi.
0
 
esariCommented:

procedure TMainForm.FormCreate(Sender: TObject);
begin
Application.OnMinimize := FormDblClick;
ShowWindow(Application.Handle,SW_Hide);
end;


procedure TMainForm.FormDblClick(Sender: TObject);
begin
Icons.Show; // taskbar icon..
ShowWindow(Handle, SW_HIDE);
ShowWindow(GetWindow (Handle, GW_OWNER),SW_HIDE);
ShowWindow(Application.Handle,SW_Hide);
end;
0
 
borgoAuthor Commented:
Many thanks to all of you who have helped me

Have a nice day.

Andrea.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now