Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
I'm working on a fairly simple project, and there is only one thibg I cant get to work correcdtly. I have 3 labels, each with an image in it, that overlap. I set the background to transparent (Windows.yaddayadda.transparent) but the background is still the system gray color. My entire project depends on this, so any help will be welcome.
  • *Gurus*
Posted

When using transparent colours on controls, I think the best you'll get is the actual form background (i.e. that gray colour) showing through. To achieve proper transparency effects, you'll want to be painting everything yourself, using GDI+.

 

This isn't quite as daunting as it sounds, the documentation is quite good and there are a lot of samples out there. If you want to draw three images that have transparent sections, it should be quite trivial. It is a matter of overriding the form's OnPaint method (or responding to the Paint event) and doing all your drawing in there.

MVP, Visual Developer - .NET

 

Now you see why evil will always triumph - because good is dumb.

 

My free .NET Windows Forms Controls and Articles

Posted
Maybe I should explain a little more. I have 3 image lists. Each label's image (part of the image list) is determined by a scrollbar's position, and is constantly changing.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...