Results 1 to 3 of 3

Thread: Transparents images in VB .Net

  1. #1

    Thread Starter
    Member leazfe's Avatar
    Join Date
    Mar 2004
    Location
    Spain
    Posts
    43

    Transparents images in VB .Net

    I have a couple of transparent image(.png), but when i use it (by a pictureImage control)in VB they lose this property. Does anyone know why? I have read, it was possible in VB 6 by using imageBox control but there isn´t this control in the .Net Version.

    Thanks,
    Alvaro

  2. #2
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489
    check out the SetStyle Method. I was just looking this up yesterday. I couldn't get it to work with a groupbox but it's worth trying with some other control

  3. #3

    Thread Starter
    Member leazfe's Avatar
    Join Date
    Mar 2004
    Location
    Spain
    Posts
    43
    I have found it. I think it´s not possible to do it with PictureBox control. I have done it direct with Bitmap control. The code is:
    Code:
     
    Dim gr As Graphics = Me.CreateGraphics
            Dim bmpAs New Bitmap("image.png")
    
            gr.DrawImage(bmpUnten, 50, 150)
    
            gr.Dispose()
            bmp.Dispose()
    The problem now is that i have to decide where i want the image to be drawn with the X and Y parameter and it is really stupid. Does anyone know another better way?
    Also, i have the follow problem. The first time i draw the image I get a blank screen( The image stay only a half second) but the next time the image is good drawn

    any help?

    Thanks,
    Alvaro
    Last edited by leazfe; Apr 30th, 2004 at 02:55 AM.

Posting Permissions

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



Click Here to Expand Forum to Full Width