Solved

Saving Icon from canvas

Posted on 1998-12-12
2
183 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying 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

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…
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…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Suggested Courses
Course of the Month9 days, 16 hours left to enroll

624 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