Results 1 to 3 of 3

Thread: [RESOLVED] Change Picturebox picture

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2005
    Posts
    248

    Resolved [RESOLVED] Change Picturebox picture

    Hi all,

    I'm writing a program that has a picturebox in it. The picture is one thing by default, and I don't have to link to the image because it is in the box's properties. I want the image to change when a certain button is pressed, However, I don't want to have to include the image with the exe file.

    Is there any way I can compile the image file with the exe, in the same way the default picture is, so that the image can be loaded with a command within the program, without having to do:

    Picture1.Picture = LoadPicture("C:\1.bmp")

    Or some such thing?

    Thanks ^_^

  2. #2
    Hyperactive Member segrobiur's Avatar
    Join Date
    May 2004
    Location
    Portugal
    Posts
    371

    Re: Change Picturebox picture

    simply insert another picturebox with visible=false and insert into that picturebox the other picture...

    when you press the button do
    Picturebox1.picture = Picturebox2.picture

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Apr 2005
    Posts
    248

    Re: Change Picturebox picture

    Ahh yeah.. I know that much but I was trying to avoid doing that, that's all. Thanks anyway ^_^.

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