Emily
Emily

Reputation: 539

brcc32 invalid bitmap format

i created a delphi component and i want to add an icon to it, i know the procedure to follow, but something does not work for me, so here is what I did:

Upvotes: 1

Views: 2063

Answers (1)

Remy Lebeau
Remy Lebeau

Reputation: 596166

Make sure your .bmp file is 8-bit (256 colors) and is 24x24 pixels in size.

Also, the resource name needs to be the component class type in all caps:

TMYCOMPONENT BITMAP "MyComponent.bmp"

Also, the IDE supports 16x16, 24x24, and 32x32 component icons, so you should include 16x16 and 32x32 bitmaps in your resource as well (otherwise the IDE will resize the 24x24 bitmap when needed, which might not look good when shrunk/stretched):

TMYCOMPONENT BITMAP "MyComponent24x24.bmp"
TMYCOMPONENT16 BITMAP "MyComponent16x16.bmp"
TMYCOMPONENT32 BITMAP "MyComponent32x32.bmp"`

Upvotes: 2

Related Questions