Solved

Saving Icon from canvas

Posted on 1998-12-12
2
176 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
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

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

809 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