Icon to Bitmap Conversion DCU 16bit Version 1.0a
(c) 1996 BranTek
All rights reserved. Unauthorized use, duplication, or distribution
is strictly prohibited by federal law.


Disclaimer
----------
The author hereby disclaims all warranties relating to this software,
whether express or implied, including without limitation any implied 
warranties of merchantability or fitness for a particular purpose.
The author will not be liable for any special, incidental, consequential,
indirect or similar damages due to loss of data or any other reason, 
even if advised of the possibility of such damages. Use of this software
constitutes agreement to these terms by the licensee.


Notice
-------------
This DCU is copyrighted property of BranTek,
All rights reserved. Unauthorized use, duplication, or distribution
is strictly prohibited by federal law.

Introduction
-------------
One of the problems that have plagued Delphi developers from the beginning is
"How to I resize an Icon in my Program?" The answer is, you cannot. It must
first be converted to a Bitmap. The question then arose "When I convert an
Icon to a Bitmap, Why do I lose my Image Quality?". No one really knew the
answer because they didn't know how to fix it. The TICOBMP DCU solves this
problem. TICOBMP is able to take a 32X32X16 (32w 32h by 16 Colors) icon
an convert it to a bitmap which may be resized and manipulated as you, the
developer, sees fit.


Installation
---------------
   ICOBMP.ZIP   Files needed to install the TIcobmp component
      ICOBMP.DCU    ICOBMP VCL
      ICOBMP.DCR    ICOBMP Resource File
      ICOBMP.HLP    ICOBMP Help File
      ICOBMP.KWF    ICOBMP Keyword File
      Example.dpr   Example Project
      icoexamp.pas  Example Project Source File
      icoexamp.dfm  Example Project Form
      readme.txt    This File

To install, copy the ICOBMP16.DCU and ICOBMP16.DCR files to your component
directory (EX: C:\DELPHI\CUSLIB). Back up the COMPLIB.DCL file just to
be safe.  Then, in DELPHI choose OPTIONS, INSTALL COMPONENTS from the menu,
select ADD, then BROWSE and install the ICOBMP16.DCU file and press OK. After
this, the ICOBMP16 DCU should install into the SAMPLES pallete of your
component bar. From here, just drop the TICOBMP component on your
form and you are good to go!

Move the ICOBMP.HLP file from your component directory to your DELPHI\BIN
Move the ICOBMP.KWF file to your DELPHI\HELP directory for Delphi 16.
Now run the HELPINST.EXE in the HELP directory for Delphi 1.x.
Next, while in HELPINST, click the open file toolbar button and find and select
the DELPHI.HDX file in the DELPHI\BIN directory.  Then click the '+' toolbar
button and find and select the ICOBMP.KWF file in the DELPHI\HELP directory.
This will add the ICOBMP.KWF file to the listbox that you can see.
Now click the 'Save' toolbar button and the ICOBMP help file will be registered
with Delphi.


Methods
---------------
TICOBMP has two funtions, ConvertIcontoBitmap and ConvertFileIcontoBitmap.
The syntax for each is as follows:

ConvertIcontoBitmap(sourceIcon: TICon; var destBitmap: TBitmap):BOOLEAN;
ConvertFileIcontoBitmap(fileName: string; IconIndex: word; var destBitmap: TBitMap):BOOLEAN;

Both functions will return TRUE if the conversion was sucessful or FALSE
if it failed. You may also specify an event to be triggered if the conversion
fails. If the conversion fails, you may access a terse description of the
error by accessing the error string property of the TICOBMP component.

Below is an Example on using the ConvertIcontoBitmap function.

procedure TMainForm.ConvertButtonClick(Sender: TObject);
var
 myIcon: TIcon;
 myBitmap: TBitmap;
 bReturn: BOOLEAN;
begin

   myIcon:=TIcon.Create;
   myBitmap:=TBitmap.Create;

   myIcon.LoadfromFile('c:\windows\circles.bmp');
   bReturn:=icobmp1.ConvertIcontoBitmap(myIcon,myBitmap);

   if bReturn=TRUE then
   begin
     .
     . do some processing, resizing, whatever.....
     .
   end;

   myIcon.Free;
   myBitmap.Free;
end;

Below is an Example on using the ConvertFileIcontoBitmap function.

{*
** This example assumes there is an OpenDialog component on the form
*}
procedure TMainForm.ConvertButtonClick(Sender: TObject);
var
 myBitmap: TBitmap;
 bReturn: BOOLEAN;
begin

if OpenDialog1.Execute then

   myBitmap:=TBitmap.Create;
   bReturn:=icobmp1.ConvertIcontoBitmap(OpenDialog1.FileName,0,myBitmap);

   if bReturn=TRUE then
   begin
     .
     . do some processing, resizing, whatever.....
     .
   end;
   myBitmap.Free;
end;


An In-depth Sample project accompanies this Archive.

Properties
---------------

Name:        ErrorString
Type:        String: Runtime-Readonly
Description: When an error occurs during an Icon Conversion, this
             string holds a terse/general description of the problem
             that occured and stopped the conversion from completing
             sucessfully.

Name:        TransparentColorMap
Type:        Byte: Design Time/Run Time
Description: Icons can have a "Transparent" color. This color will
             not be transparent when the Icon is converted to a Bitmap.
             This property lets you select a color to be used as the
             "transparent" or background color.

Name:        OnFail
Type:        TNotifyEvent: Design Time/Run Time
Description: If the conversion fails for any reason, the event you specify
             in the OnFail property will be triggered.

Requirements
-------------
DELPHI 1.0 for Windows
This component is not compatible with DELPHI 1.0

ORDER INFORMATION
-----------------
		
                Product ID      DVCL496V16a
                Description     TIcobmp version 2.0

                Or on Compuserve GO SWREG
                and use Registration ID 9206.              
	    
	Pricing Options    
	----------------
        TICOBMP v1.0a is priced to move at $29.95!
        Ohio Residents add 6% sales tax (Unless Registering
        through Compuserve. You will be directed as to how
        much Sales Tax to Pay). Price subject to change without
        prioir notification.

        Shipping
        ----------------
        Unless requested via E-Mail, all orders will be shipped via E-Mail.
        If you would like you order shipped on a *diskette, please send us
        an E-Mail indicating the size you desire. Please allow 2-4 weeks
        for delivery of diskette orders. All diskettes will be shipped
        via First Class Mail.

        *Diskette Orders Inside US add $2.00 for Shipping and handling.

        Why Register?
        ----------------
        Registered Users will receive One free Upgrade of this Product
        as well as Future Discounts on Purchases of this and other
        BranTek Products. Registered users will also
        receive priority technical support.


Technical Support
-----------------

Technical Support May be obtained VIA E-Mail and World Wide Web.

E-Mail: Support@brantek.com
World Wide Web: http://www.brantek.com

When requesting support, please supply the following information:

Customer Number 
Product Name
Your Operating System 
Your Computer Type
Amount of Memory (2,4,8,16MB, etc)
Condition in which the error occured.
A Phone Number where you may be reached

Policy:
    Technical Support for Demo/Non-registered programs are not guaranteed to be
    answered within 24 hours. If you are a customer and are using a Non-Registered
    product, you do not fall within this exclusion. Customers will receive
    priority support.
	
