We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now


Project to display tranparent image

Medium Priority
Last Modified: 2012-05-11

I am trying to do a project in VB (VS2010/2008) to just display and image onscreen with the "empty" parts of the image be transparent and show the underlying window.  I would appreciate it if someone could point me to a sample project that examples something like this or some sample code.  I am relatively new to VB but have been doing VBA and C++ for a long time.

I am familiar with how to create a form and picturebox but the grey background of the form shows behind the picture and I just want to show the desktop/etc in the background...

Thank you,
Watch Question


Actually I got everything I needed just by loading the miage in the background and setting the color to window and background to transparent (web) but for some reason the image doesn't display, a white X has just some of the pixels.  See attached. t6est
What's your ImageTransparentColor property set to for the image control?
You can try making the backcolor of your form Red and also setting the TransparencyKey of the form to Red as well. Now the transparent area of the background image (Which would have showed up Red) will show transparent because the TransparencyKey of the form is also set to red.
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview
Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.