Solved

Setting transparent background on option button control

Posted on 1998-08-31
5
177 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

688 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