Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transparent picturebox

Status
Not open for further replies.

Glasgow

IS-IT--Management
Jul 30, 2001
1,669
GB
I have a graphic that is made up of some text labels and a number of shapes - oval, rectangles etc. From the user's point of view it appears as a single logo. The problem is that I want to be able to easily cut & paste the graphic as a single object from one application to another without multiple-selecting the dozen or so objects that it is actually made up of. When I put them in a container like a frame or a picturebox, that does the trick but I need the frame or picturebox to be transparent.

I have seen references to achieving this sort of thing via several lines of code and/or API calls but am I missing something simple? Setting FillStyle property seems to have no effect.

Thanks in advance.
 
Have you tried using a label with it's background set to transparent?

[gray]Experience is something you don't get until just after you need it.[/gray]
 
But I need the objects to be grouped in a container - I can't use a label as a container. Or do I misunderstand your suggestion?
 
Of course that won't work because it's not a container! Sorry Glasgow.

[gray]Experience is something you don't get until just after you need it.[/gray]
 
Glasgow,

If you've not figured it out yet, you could try a search on planetsourcecode for Translucency.ocx.

It's not exactly what you want but it may help you.

Big Al

[gray]Experience is something you don't get until just after you need it.[/gray]
 
Thanks for the tip bigalbigal. I guess I was hoping for something simple that would avoid reams of code or third party components. I thought it was just possible I'd missed something glaringly obvious like a nice

PictureBox1.TransparentPrettyPlease = True

It appears I may be out of luck.
 
Did you try...

PictureBox1.TransparentPrettyPleaseIBegOfYouAndPromiseToBeYourFriendForTheRestOfMyLife = True

[elephant2]


[gray]Experience is something you don't get until just after you need it.[/gray]
 
I considered it but decided that constituted 'reams of code'!!
 
i have an example on pscode that illustrates how to use steve mcmahons clsDibRegion class that can mask a region on any control/object with an hwnd. the illustration is actually an example of how to rotate an image interactively like you can in photoshop or word (with rotation handles), but gives a good sense of how to accomplish what you are referring to.

Ray

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top