It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

Picture Box problems

Moderator: dafunkymunky

Picture Box problems

Postby supercell1970 on Tue Jul 07, 2009 5:33 pm

Hello, I am programming in Visual Basic 6 and I am having
difficulty in removing a graphic image previously loaded into a control,such
as picturebox. What is supposed to happen is when a person clicks on the blank picture box, it loads an image from a group of image choices. That works fine though. The problem is when someone clicks on the picture box again to load another image, the first picture is still being displayed.

This is complicated, because I am trying to design an rpg game.
What can be done? I am willing to return the favor.
supercell1970
 
Posts: 1
Joined: Tue Jul 07, 2009 5:23 pm

Re: Picture Box problems

Postby Keithuk on Sat Jul 11, 2009 12:15 am

supercell1970 wrote:Hello, I am programming in Visual Basic 6 and I am having
difficulty in removing a graphic image previously loaded into a control,such
as picturebox. What is supposed to happen is when a person clicks on the blank picture box, it loads an image from a group of image choices. That works fine though. The problem is when someone clicks on the picture box again to load another image, the first picture is still being displayed.


Well thats straight forward. You haven't said how these pictures are loaded. From another picturebox, ImageList, database, hard drive or what?

To remove a picture from a picturebox you just use

Picture1.Picture = LoadPicture("")
or
Picture1.Picture = Nothing
:?
User avatar
Keithuk
 
Posts: 11
Joined: Fri Jun 01, 2007 11:16 am
Location: Staffordshire, England


Who is online

Users browsing this forum: No registered users and 9 guests