Re: Transparent background - PLEASE HELP


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Re: Transparent background - PLEASE HELP

  1. #1
    David Burstin Guest

    Re: Transparent background - PLEASE HELP

    I need the control to be transparent so that it can show the image behind it
    which is not just 1 color.


    Mike <m_culley@one.net.au> wrote in message news:38c0446b$1@news.devx.com...
    >
    > You could set the user controls backcolor to be the same as the forms.
    >
    > UserControl.BackColor=Ambient.BackColor (i think)
    >
    >
    > "David Burstin" <david@precise.com.au> wrote:
    > >I have created a user control similar to the slider control.
    > >
    > >The sliding part is an image control, the image is a .gif file.
    > >
    > >The image is transparent if it is placed directly on a form, however in

    > the
    > >usercontrol it takes on the background color of the control, even thought
    > >the control is transparent!
    > >
    > >It seems that the image cannot get the background of the form through the
    > >usercontrol.
    > >
    > >Does anyone know how to set the background of an image on a user control

    > to
    > >be transparent right through the control and onto the form/container?
    > >
    > >
    > >
    > >
    > >
    > >
    > >
    > >
    > >
    > >

    >




  2. #2
    David Guest

    Re: Transparent background - PLEASE HELP

    The UserControl can be transparent (BackStyle = 0), but then it forwards
    mouse click events to the container -- doesn't capture them, at least as far
    as I know. I was trying to do this last week and did not succeed. I had an
    exchange with Phil Weber about this on this news group, and he pointed me to
    a useful article at MS about windowless UserControls, the HitTest event, and
    such, but now I do not see this exchange in the news group listing and I did
    not save the article.

    (sorry, best I can do)


    David Burstin <david@precise.com.au> wrote in message
    news:38e424b7@news.devx.com...
    > I need the control to be transparent so that it can show the image behind

    it
    > which is not just 1 color.
    >
    >
    > Mike <m_culley@one.net.au> wrote in message

    news:38c0446b$1@news.devx.com...
    > >
    > > You could set the user controls backcolor to be the same as the forms.
    > >
    > > UserControl.BackColor=Ambient.BackColor (i think)
    > >
    > >
    > > "David Burstin" <david@precise.com.au> wrote:
    > > >I have created a user control similar to the slider control.
    > > >
    > > >The sliding part is an image control, the image is a .gif file.
    > > >
    > > >The image is transparent if it is placed directly on a form, however in

    > > the
    > > >usercontrol it takes on the background color of the control, even

    thought
    > > >the control is transparent!
    > > >
    > > >It seems that the image cannot get the background of the form through

    the
    > > >usercontrol.
    > > >
    > > >Does anyone know how to set the background of an image on a user

    control
    > > to
    > > >be transparent right through the control and onto the form/container?
    > > >
    > > >
    > > >
    > > >
    > > >
    > > >
    > > >
    > > >
    > > >
    > > >

    > >

    >
    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center