Solved

Saving Icon from canvas

Posted on 1998-12-12
2
180 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
[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
2 Comments
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 100 total points
ID: 1350762
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
ID: 1350763
Thanks
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

734 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