Project to display tranparent image

Posted on 2011-04-27
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,
Question by:jason987
    LVL 5

    Author Comment

    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
    LVL 4

    Expert Comment

    What's your ImageTransparentColor property set to for the image control?
    LVL 4

    Expert Comment

    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.
    LVL 5

    Accepted Solution

    Everything I wanted to do could be done through form controls with no code.
    LVL 100

    Expert Comment

    This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

    Featured Post

    Training Course: Java/J2EE and SOA

    This course will cover both core and advanced Java concepts like Database connectivity, Threads, Exception Handling, Collections, JSP, Servlets, XMLHandling, and more. You'll also learn various Java frameworks like Hibernate and Spring.

    Join & Write a Comment

    Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
    Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

    731 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now