Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7900733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:02:29+00:00 2026-06-03T09:02:29+00:00

I think I must be missing something obvious, but I’m unable to find this

  • 0

I think I must be missing something obvious, but I’m unable to find this after several hours of searching. Is there no way to use a PictureBox or other control to contain an image with partial transparent/alpha-blended pixels, and place that over another image and have the blending be based on the image under it?

For example, this produces the results I want:

  1. Place a panel on a form.
  2. Add an OnPaint handler.
  3. In the OnPaint handler draw 1 PNG, then draw another PNG over it, using Graphics.DrawImage for both.

This does not:

  1. Place a PictureBox on a form and set it to a PNG.

  2. Place another PictureBox on the form and set it to a PNG.

  3. Place the 2nd picture box over the first.

…even if the 2nd picture box is just empty and has a background color of Transparent, it still covers the picture below it.

I’ve read this stems from all winform controls being windows, so by nature they aren’t transparent.

…but even the 15 year old platform I’m migrating from, Borland’s VCL, had several windowless controls, so it’s hard to imaging winforms doesn’t at least have some easy solution?

My first example above is one answer, true, but that adds a lot of work when you can only use one big panel and draw all of your “controls” inside of it. Much nicer if you can have separate controls with separate mouse events/etc. Even if not an image control, and a control I have to draw myself, that would be fine, as long as I can just put one image in each control. In VCL they called this a “paint box”, just a rectangle area you could place on a form and draw whatever you want on it. Has it’s own mouse events, Bounds, etc. If you don’t draw anything in it, it is like it’s not even there (100% transparent) other than the fact it still gets mouse events, so can be used as a “hot spot” or “target” as well.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T09:02:30+00:00Added an answer on June 3, 2026 at 9:02 am

    The PictureBox control supports transparency well, just set its BackColor property to Transparent. Which will make the pixels of its Parent visible as the background.

    The rub is that the designer won’t let you make the 2nd picture box a child of the 1st one. All you need is a wee bit of code in the constructor to re-parent it. And give it a new Location since that is relative from the parent. Like this:

        public Form1() {
            InitializeComponent();
            pictureBox1.Controls.Add(pictureBox2);
            pictureBox2.Location = new Point(0, 0);
            pictureBox2.BackColor = Color.Transparent;
        }
    

    Don’t hesitate to use OnPaint() btw.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I think I must be missing something, why can't I compile this: class Foo<T>
I must be missing something obvious, but I can't make it work I want
I must be missing something obvious here, but I can't seem to get the
I think I got all the steps down but I must be missing something
I am trying to do the following but I think I must be missing
I'm trying to find a way to to do something that I think must
I'm having trouble using newly installed gems - I think there must be something
I am missing something obvious, but I'm not sure what. I have a single
I am missing something obvious, but I'm not sure what. I have a single
I think I must be missing something very simple here (and apologies if I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.