Results 1 to 10 of 10

Thread: Transparent Backcolor components??

  1. #1
    Low Bitrate SonicCobra03's Avatar
    Join Date
    Sep 2003
    Location
    STL
    Posts
    87

    Transparent Backcolor components??

    I'm building an app with VB.NET 2003, Windows Media Player component, and Access DB. I'm using picture boxes as buttons and have build the interface for it. The problem is that I can't set the controls' backcolor to transparent, such as a listbox. How did you guys get around this in your apps? I have some nice Photoshop'd pictures in my app, but it looks like doo doo cause the forms backcolors are hiding it. When I set the backcolor property to Transparent it says it's not valid value. When I set it in the code on form_load it says the same thing when I run it. Should I take a different approach?

  2. #2
    I'm sorry, and you are....? frodobaggins's Avatar
    Join Date
    Jan 2003
    Location
    Ruston, LA
    Posts
    8,846
    Use image boxes.
    [H]4 Life
    My next generation Front End is right on schedule.
    It will be done sometime in the next generation.
    I'm a lesbian too.
    I am for hire!

  3. #3
    Low Bitrate SonicCobra03's Avatar
    Join Date
    Sep 2003
    Location
    STL
    Posts
    87
    Quote Originally Posted by frodobaggins
    Use image boxes.
    ??? How could I use that for a listbox for a playlist? I must be missing your point. Sorry.

  4. #4
    I'm sorry, and you are....? frodobaggins's Avatar
    Join Date
    Jan 2003
    Location
    Ruston, LA
    Posts
    8,846
    Quote Originally Posted by SonicCobra03
    ??? How could I use that for a listbox for a playlist? I must be missing your point. Sorry.
    I thought you meant for your buttons.
    [H]4 Life
    My next generation Front End is right on schedule.
    It will be done sometime in the next generation.
    I'm a lesbian too.
    I am for hire!

  5. #5
    I'm sorry, and you are....? frodobaggins's Avatar
    Join Date
    Jan 2003
    Location
    Ruston, LA
    Posts
    8,846
    I'm not very familiar with VB.net, but in VB6, if you want a transparent listbox, you
    need to subclass it and paint the background of the listbox with a picture of the area
    behind it.
    [H]4 Life
    My next generation Front End is right on schedule.
    It will be done sometime in the next generation.
    I'm a lesbian too.
    I am for hire!

  6. #6
    Constant Bitrate
    Join Date
    Jan 2004
    Posts
    202
    just as in vb6 you have to "sub class" it in vb.net to get the look u want
    .net doesnt have a built in way to do this so you have to override all the methods for transparency..

  7. #7
    Maximum Bitrate GingerPrince's Avatar
    Join Date
    Apr 2003
    Location
    Leeds, UK
    Posts
    533
    It's the same in most languages, Delphi included (I had to do my own component for CarBox).

    GingerPrince

    Car changed for TVR Griffith 500, so computer de-installed. Using a Dension 100ix w/60Gb HD unit in the interim.

    Carputer Install - http://www.stuffandting.com/carputer/
    CarBox Software -- http://www.stuffandting.com/carbox/

  8. #8
    Variable Bitrate
    Join Date
    Sep 2003
    Location
    Wilkes Barre, Pa
    Posts
    233
    I find it easier to just build your list into a "collection". Then build a GUI interface.
    Take a picturebox and make an array of imagebox's inside the picturebox.. Use the picture box for scrolling and load an image for each song into the imagebox. Or only load like 20 images and change the value as your scroll. But thats me.. I like building my own controls.

  9. #9
    Newbie weaselcoder's Avatar
    Join Date
    Jan 2004
    Location
    Orlando, FL
    Posts
    24

    Transparent Backgrounds

    I am writing my app (IgnitionMediaPC) in VB.net and there are a few controls that allow transparent backgrounds. There are API calls that you can do or try this statement in the initialize of the form...

    Control.SetStyle(AllowTrransparentBackround, True).

    This will not show up in intellisense until the ( is typed.

    The way I am doing a listbox type control is using a panel and adding lables to that, allowing scrolling, (overrideing to hide) and use pnl.scrollintoview(lbl) call.

  10. #10
    Low Bitrate SonicCobra03's Avatar
    Join Date
    Sep 2003
    Location
    STL
    Posts
    87
    Quote Originally Posted by weaselcoder
    The way I am doing a listbox type control is using a panel and adding lables to that, allowing scrolling, (overrideing to hide) and use pnl.scrollintoview(lbl) call.
    I thought about doing that also, I just thought there might be an easier way. Thanks for the replies.

Similar Threads

  1. Make winamp transparent
    By churnopol in forum Software & Software Development
    Replies: 3
    Last Post: 06-21-2003, 06:18 PM
  2. transparent images?
    By Stine161 in forum Auto-Play
    Replies: 1
    Last Post: 12-13-2002, 12:07 AM
  3. Replies: 162
    Last Post: 11-18-2002, 12:15 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •