Solved

Easy way to hide taskbar icon on minimize?

Posted on 1998-09-18
13
639 Views
Last Modified: 2010-05-18
How do I hide the taskbar icon on minimize?

Thanks
0
Comment
Question by:ripcord
[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
  • 6
  • 2
  • 2
  • +2
13 Comments
 
LVL 10

Expert Comment

by:viktornet
ID: 1340189
What do you call a taskbar icon??

//Vik
0
 
LVL 20

Expert Comment

by:Madshi
ID: 1340190
ripcord,

if you mean the taskbar button, just call
"ShowWindow(form1.handle,SW_HIDE)"

Regards, Madshi.
0
 
LVL 5

Expert Comment

by:JimBob091197
ID: 1340191
Or ShowWindow(Application.Handle, SW_HIDE); to remove the project's icon from the Windows Taskbar.

Cheers,
JB
0
[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

 
LVL 10

Expert Comment

by:viktornet
ID: 1340192
Hello guys! Any of you know what the Task Icon is??? Do you mean the taskbar button of your app???

Regards,
Viktor Ivanov
0
 
LVL 5

Expert Comment

by:JimBob091197
ID: 1340193
Hi Viktor

I *think* that ripcord means that the taskbar icon is (as you say) the taskbar button of your app.

JB
0
 

Author Comment

by:ripcord
ID: 1340194
ya I was talking about the taskbar button of my app. I want it to be hidden on minimzie. Then to come back when the from is restored from the tray icon. I've tried the above suggestions with the OnResize event of the form but it doesn't seem to work. This is what I tried, but it doesn't seem like the OnResize gets triggered when clicking on the minimize button.

 If (frmMain.WindowState = wsMinimized) and
    (frmOptions.chkHideTaskbar.Checked = True) Then
    ShowWindow(Application.Handle, SW_HIDE);
0
 
LVL 10

Accepted Solution

by:
viktornet earned 50 total points
ID: 1340195
Here is what you do....
  private
    procedure MyMin(Sender : TObject);
    procedure MyRes(Sender : TObject);

procedure TForm1.MyMin(Sender : TObject);
begin
    ShowWindow(Application.Handle, SW_HIDE);
end;
procedure TFOrm1.MyRes(Sender : TObject);
begin
    ShowWindow(Application.Handle, SW_RESTORE);
end;

Regards,
Viktor Ivanov
0
 

Author Comment

by:ripcord
ID: 1340196
Ok, but how do I get procedure MyMin(Sender : TObject);  to get exectuted when the user clicks on the min button on the form?
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1340197
Add this to your OnCreate() of the form...

Application.OnMinimize := MyMin;
Application.OnRestore := MyRes;

Regards,
Viktor Ivanov
0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1340198
Bought This Question.
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1340199
what?
0
 
LVL 20

Expert Comment

by:Madshi
ID: 1340200
Hi Vik, do you know the automatic "Edited Question" and "Points adjusted to XXX" comments? I guess the "Bought This Question" comment is a new automatic one...   :-)
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1340201
Wow, why dont they invent a self answering feature ;-))
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
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…
Suggested Courses
Course of the Month6 days, 3 hours left to enroll

627 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