Setting transparent background on option button control

Is there any way to make the background transparent in any of the other VB controls that do not have the opaque-transparent option such as the option button control
emidiodAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
bad_imaConnect With a Mentor Commented:
Try the "Microsoft Forms 2.0 Object Library" which has almost all standard controls including commandbutton, option button with this option! And ... even more options!
0
 
DalinCommented:
emidiod,
I would suggest you set the backcolar pproperty to be the same of the background (form, frame, picture box)...

I have some code to set a region transparant, but everything is "transparent", including the text... If you would like the code anyway, let me know.

regards
Dalin
0
 
watyCommented:
One simple way to do this is to follow the following steps:

1) In your Form_Resize event, create two rectangular Regions using CreateRectRgn API call: one the size of the form, and one where you want the rectangular hole. Don't forget to convert Twips to Pixels!

2) Use CombineRgn to create a new region from the two regions above. I think you'll need to use RGN_XOR as the operator here, or maybe RGN_DIFF.

3) Call SetWindowRgn() using the hWnd of your form and the Region you created in step (2).

4) Clean up your region resources with DeleteObject()

0
 
emidiodAuthor Commented:
where can i find "Microsoft forms 2.0 Object library"
0
 
InteqamCommented:
waty

i don't want to use msforms 2.0

i am interested in your idea, can you explain more please ?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.