Solved

Setting transparent background on option button control

Posted on 1998-08-31
5
160 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

758 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

18 Experts available now in Live!

Get 1:1 Help Now