Solved

Saving Icon from canvas

Posted on 1998-12-12
2
174 Views
Last Modified: 2010-05-18
Are there any way I can save a part of a canvas as an Icon ?
0
Comment
Question by:carceri
2 Comments
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 100 total points
Comment Utility
Look at CreateIcon and CreateIconIndirect. CreateIconIndirect will be better for what you want to do. Copy the part of the Canvas you want to make into an icon into a TBitmap and use the code below to create the icon.

var
  TheIcon : TIcon;
  IconInfo : TIconInfo;

begin
IconInfo.fIcon := True;
IconInfo.xHotSpot := 0;
IconInfo.yHotSpot := 0;
IconInfo.hbmMask := 0;
IconInfo.hbnColor := TheIconBitmap.Handle;

TheIcon := TIcon.Create;
TheIcon.Handle := CreateIconIndirect(IconInfo);
end;

Cheers,

Raymond.

0
 

Author Comment

by:carceri
Comment Utility
Thanks
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This video discusses moving either the default database or any database to a new volume.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now