Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Images on Command Button

Status
Not open for further replies.

robctech

IS-IT--Management
Oct 12, 2001
114
CA
Thanks to all those that tried to help me find the solution but I finally figured out how to do it and thought I would
post it as a tip for anyone else looking for this solution.


Add an ImageList to your form.
In the properties of the image list use the preset sizes 16x16, 32 x 32 or set a custom image size to use.
Click on the images tabe and add your images into the image list.
I enter Key information to each of my images for easier reference but if you only have one or two not a big deal.

Now to see below how to set the picture on the command button to one of your images at the size defined in ImageList properties.

{ButtonObject}.Picture = ImageList1.ListImageImageKey).ExtractIcon

if you want the image in its normal size (size it appears when opened in an image editor)

{ButtonObject}.Picture = ImageList1.ListImageImageKey).Picture

 
very good
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top