Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 109,543 VB Programmers for FREE! Ask your question and get quick answers from experts. There are 1,176 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



picturebox background color transperency

 
Reply to this topicStart new topic

picturebox background color transperency

caz345
post 1 Aug, 2008 - 07:21 AM
Post #1


New D.I.C Head

*
Joined: 1 Aug, 2008
Posts: 2


My Contributions


I'm fairly new at visual basic and I'm just making a simple little program that makes the background behind the character move instead of the character so I have a picturebox that holds the background and moves around. The problem I'm having is that the picturebox that holds the character has an animation with a transparent background. I set the color of the picturebox to transparent but it takes it's color directly from the back, the form, is there a way to make it take the picture from the picturebox or any other way to achieve this. I can't find any code related to this I can't find a way to make the form display the same thing as the picturebox that holds the background.

What I've thought to do is try and save the program screen as a picture and load it onto the form backgroundimage
I could not find a way to do that the closest I got was this
CODE
    
Private Sub reloadb()
        picturebox2.Hide()
me.backgroundimage.save(C:\bimage.jpg")
        Me.BackgroundImage = Image.FromFile("C:\bimage.jpg")
        picturebox2.Show()
    End Sub

that doesn't work because for some reason unless the form has been drawn on it won't save and even if it did it would change nothing it's just saving and loading the same thing
I tried to change the me.backgroundimage.save to
CODE

backview.Image.Save("C:\bimage.jpg")

backview is the picturebox with the background I'm using in it
I did this with a small hope it might only save the part shown on the form I was wrong, and it only managed to do it once because visual basic has an issue overwriting the file.

I can't think of anything else to do.

This post has been edited by caz345: 1 Aug, 2008 - 08:17 AM
User is offlineProfile CardPM

Go to the top of the page


caz345
post 6 Aug, 2008 - 02:29 PM
Post #2


New D.I.C Head

*
Joined: 1 Aug, 2008
Posts: 2


My Contributions


Can't anyone help?
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 9/7/08 09:56PM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month