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

Forum

Log In Sponsors
Partner Sites
Board index Programming Visual Basic Forum

Picture Box problems

Moderator: dafunkymunky

Picture Box problems

Postby supercell1970 on Tue Jul 07, 2009 6: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 6:23 pm

Re: Picture Box problems

Postby Keithuk on Sat Jul 11, 2009 1: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
:?
Martin2k

I've been programming with VB for 13 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.
User avatar
Keithuk
 
Posts: 9
Joined: Fri Jun 01, 2007 12:16 pm
Location: Staffordshire, England


Return to Visual Basic Forum

Who is online

Users browsing this forum: No registered users and 0 guests