Using a Custom Bitmap for a PowerBuilder Window Icon

Sybase’s PowerBuilder allows you to choose an icon for a window. However, the list includes only the .ico resources. Menus and toolbars, which can use the bitmap resources, have a much larger set of images in their drop-downs.

I don’t really care about the nuances that distinguish icon and bitmap resources. I just want the image choices to be consistent throughout the product.

The Problem

Here’s what can happen:

You find a custom image you really like for your dialog, and you assign it to the menu item, the toolbar item and perhaps a picture button or two. So you have your image appearing consistently throughout your application so the user is really dialed-in to what you want that image to convey. Then, you think, hey, let’s also put the image as the icon for my dialog (by icon, I mean the small image that appears in the window header, usually on the far left).

But, you discover that the choices for your windows are limited only to .ico resources. A very small listing in PowerBuilder.

The Solution

Here’s how you get the bitmap out of PowerBuilder so you can use it as an icon:

Using Resource Hacker, open the pbvm DLL. For PB 9.0, this is Program Files / Sybase / Shared / PowerBuilder / pbvm90.dll.

Select View / Expand Tree.

Now, scroll through the list looking for the image you’re after. Once you find it, right-click and choose Save [Bitmap : 25 :1033 ] (your numbers will be different).

Now, you simply convert that bitmap to an icon. Using IrfanView, open the image, and save it as an .ICO file with transparency. Select the color you want to be transparent (usually the gray color), and you’re all set!

Advertisements
Published in: on March 20, 2008 at 6:05 pm  Comments (4)  
Tags:

The URI to TrackBack this entry is: https://dmcmeans.wordpress.com/2008/03/20/using-a-custom-bitmap-for-a-powerbuilder-window-icon/trackback/

RSS feed for comments on this post.

4 CommentsLeave a comment

  1. My name is Thurman Dahood

    Simply like to begin by stating

    Thanks Admins !
    I am new member on this site and Thank You for providing such a wonderful community !

  2. I visited multiple blogs but the audio quality for audio songs current at
    this site is in fact wonderful.

  3. I like what you guys tend to be up too. Such clever work and reporting!
    Keep up the excellent works guys I’ve you guys to my blogroll.

  4. I will immediately snatch your rss feed as I can’t to find your e-mail subscription hyperlink or e-newsletter service. Do you’ve any?
    Kindly allow me know so that I may just subscribe. Thanks.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: