BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to set icon and caption of windows taskbar button?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Native API)
View previous topic :: View next topic  
Author Message
Simon Elliott
Guest





PostPosted: Fri May 27, 2005 1:45 pm    Post subject: How to set icon and caption of windows taskbar button? Reply with quote



Earlier today I asked in the VCL newsgroup how to get a subform to
display a windows taskbar button. I was very quickly given the info I
needed.

Now I'd like to gove the taskbar button its own icon and caption -
possibly different from the ones shown by the form. How do I do this?

--
Simon Elliott http://www.ctsn.co.uk
Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Fri May 27, 2005 5:02 pm    Post subject: Re: How to set icon and caption of windows taskbar button? Reply with quote




"Simon Elliott" <Simon at ctsn.co.uk> wrote


Quote:
Now I'd like to gove the taskbar button its own icon and
caption - possibly different from the ones shown by the
form. How do I do this?

The Caption of the Taskbar Button is always the same as the Form's Caption,
and the Icon is the same as the Form's Icon. You cannot specify a different
Caption and Icon that are just for the button alone. They have to be
applied to the Form as well.


Gambit



Back to top
Heinrich Wolf
Guest





PostPosted: Sat May 28, 2005 5:16 am    Post subject: Re: How to set icon and caption of windows taskbar button? Reply with quote



Hi,

IMHO there may be a difference between Form.Caption and Application.Title,
which shows when the main form is minimized. The icon is unique.

Regards,
Heiner


Back to top
Heinrich Wolf
Guest





PostPosted: Sat May 28, 2005 5:22 am    Post subject: Re: How to set icon and caption of windows taskbar button? Reply with quote

Hi,

just run the template, which is presented on start up of e.g. Delphi 5.
Your form has the caption Form1. The button on the taskbar is labeled
Project1.

Regards,
Heiner


Back to top
Heinrich Wolf
Guest





PostPosted: Sat May 28, 2005 5:45 am    Post subject: Re: How to set icon and caption of windows taskbar button? Reply with quote

Hi,

in the IDE menu Project-Options-Application you can set a title and a symbol
(icon).
This icon is shown in the explorer.
Put some tImage-s in your form with visible=false and load your icons into
their picture-s
At run time you can change application.title and
application.icon.assign(image1.picture.icon).
These will be shown on the taskbar button. This icon will also be shown on
the form.
But after that at run time you can form.icon.assign(image2.picture.icon) for
the form
different from the taskbar button.

Regards
Heiner


Back to top
Simon Elliott
Guest





PostPosted: Sat May 28, 2005 11:22 am    Post subject: Re: How to set icon and caption of windows taskbar button? Reply with quote

On 27/05/2005, Remy Lebeau (TeamB) wrote:

Quote:
Now I'd like to gove the taskbar button its own icon and
caption - possibly different from the ones shown by the
form. How do I do this?

The Caption of the Taskbar Button is always the same as the Form's
Caption, and the Icon is the same as the Form's Icon. You cannot
specify a different Caption and Icon that are just for the button
alone. They have to be applied to the Form as well.

OK. I vaguely recalled from the olden days of Petzold that there was a
way of drawing on the taskbar button's canvas, but it was so long ago
that my memory could be a bit flaky...

--
Simon Elliott http://www.ctsn.co.uk

Back to top
Alistair
Guest





PostPosted: Fri Nov 18, 2005 6:44 pm    Post subject: Re: How to set icon and caption of windows taskbar button? Reply with quote

Simon Elliott wrote:
Quote:
On 27/05/2005, Remy Lebeau (TeamB) wrote:

Now I'd like to gove the taskbar button its own icon and
caption - possibly different from the ones shown by the
form. How do I do this?

The Caption of the Taskbar Button is always the same as the Form's
Caption, and the Icon is the same as the Form's Icon. You cannot
specify a different Caption and Icon that are just for the button
alone. They have to be applied to the Form as well.

OK. I vaguely recalled from the olden days of Petzold that there was a
way of drawing on the taskbar button's canvas, but it was so long ago
that my memory could be a bit flaky...


Well, Get the taskbar handle, then get the child handle to the window
containing the taskbar buttons, then search for the child window that is
your applications taskbar button.

Get a DC for the window and draw.

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Native API) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.