Results 1 to 3 of 3

Thread: [RESOLVED] transparent picturebox

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2012
    Posts
    56

    Resolved [RESOLVED] transparent picturebox

    I started off with a VERY simple form and added a picturebox item to it. The code I was following used a procedure in the Form1.vb to override the transparent color of the image:

    Code:
            bmp.MakeTransparent(Color.Fuchsia)
    bmp was defined in the Form's "Load" section.

    Now things are different. I have more than 20 picturebox items now, each created in the Form1.Designer.vb code as follows:

    Code:
            Me.Tile020.Image = CType(resources.GetObject("Tile020.Image"), System.Drawing.Image)
            Me.Tile020.Location = New System.Drawing.Point(922, 297)
            Me.Tile020.Name = "Tile020"
            Me.Tile020.Size = New System.Drawing.Size(64, 64)
            Me.Tile020.TabIndex = 3
            Me.Tile020.TabStop = False
    The image is referenced from the resources. When I run the program, I'd like all these images to have their backgrounds transparent. None of these controls is currently referenced anywhere in the code at present.

    What's the best way to get them to display transparently, other than recreating them as transparent .PNG's?

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: transparent picturebox

    Moved To VB.NET

  3. #3

    Thread Starter
    Member
    Join Date
    Jan 2012
    Posts
    56

    Re: transparent picturebox

    Just as a question, how do you (as the moderator) differentiate between "VB" and "VB.NET"?? I always thought that "VB.NET" was for people developing Visual Basic applications for internet - applets and so forth, hence the name ".NET" - rather than the stand-alone programs running on PC's. Is this wrong??

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