Solved

Setting transparent background on option button control

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…

776 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