• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 209
  • Last Modified:

Command Button Tranparency ?

Can VB set it command button picture's background to tranparent ?
How ?
 
0
netcool
Asked:
netcool
  • 4
  • 2
  • 2
1 Solution
 
khaledcCommented:
Some controls have a Background color property. This property can be set to Transparent or opaque (the value 0 or 1). label control is a good example.
However, such property is not available for a command button (don't know why?), therefore it is impossible to make a command button transparent. The best you can do with a command button is to insert an icon on it.
Hope this answered your question
0
 
khaledcCommented:
Can you at least mention why the answer was rejected.
0
 
netcoolAuthor Commented:
khaledc,

By inserting  the icon on it does not help me because i want the picture itself become as
a button with no border or anything for example a basketball picture , i want just the ball
shown on the form and without any frame around the button.....

Thank you for your input.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
kamallCommented:
netcool,
This can be done using the image control with a *.WMF picture. There are some WMF pictures under the VB graphics\metafile directory. You can try one and see.
The image control has a click event, and hence can be used as a button.
If this helps you, please unlock the question to give me the credit.

Regards
0
 
netcoolAuthor Commented:
Khaledc,

Actually your method also working to get the result i want but my program has to use
bmp files format for button pictures becuase it is the standards set by our companyfor all our program ..so ico picture doesn't help me in this case. Anyway i learn new thing from
you. Thank you.
0
 
netcoolAuthor Commented:
Khaledc,

Actually your method also working to get the result i want but my program has to use
bmp files format for button pictures becuase it is the standards set by our companyfor all our program ..so ico picture doesn't help me in this case. Anyway i learn new thing from
you. Thank you.

netcool
0
 
netcoolAuthor Commented:
kamall, i how do i give point to you for your answer ???
I have tried you method it also working ....it is just we have to convert all our bmp files to
WMF format in order to use you method. So , i think some credit should be given to u.
Thank you.
0
 
kamallCommented:
netcool,
To be able to give me the points, you should have rejected the proposed answer to unlock the question and enable me to lock it, answer it, and get the credit.
Anyway, if you like to give me the points, you can ask another question with title "To kamall..." and write "These are your points for your answer for the Command Button Tranparency question". I can then lock the question and get the points.

Regards
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

  • 4
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now