Solved

Setting transparent background on option button control

Posted on 1998-08-31
5
162 Views
Last Modified: 2012-06-27
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
0
Comment
Question by:emidiod
5 Comments
 
LVL 9

Expert Comment

by:Dalin
ID: 1432129
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
 

Accepted Solution

by:
bad_ima earned 50 total points
ID: 1432130
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
 
LVL 14

Expert Comment

by:waty
ID: 1432131
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
 

Author Comment

by:emidiod
ID: 1432132
where can i find "Microsoft forms 2.0 Object library"
0
 
LVL 7

Expert Comment

by:Inteqam
ID: 2542571
waty

i don't want to use msforms 2.0

i am interested in your idea, can you explain more please ?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now