clearing picture from picture box

Reply

Join Date: Jan 2007
Posts: 12
Reputation: teklu is an unknown quantity at this point 
Solved Threads: 1
teklu teklu is offline Offline
Newbie Poster

clearing picture from picture box

 
0
  #1
Jul 2nd, 2007
I am doing a picture in my project and I want to clear that picture from the picture box without deleting the other drawn picture when a command button is pressed .
any help
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 848
Reputation: QVeen72 is on a distinguished road 
Solved Threads: 120
QVeen72's Avatar
QVeen72 QVeen72 is offline Offline
Practically a Posting Shark

Re: clearing picture from picture box

 
0
  #2
Jul 2nd, 2007
Hi,

Just use:

Picture1.Cls

Regards
Veena
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 12
Reputation: teklu is an unknown quantity at this point 
Solved Threads: 1
teklu teklu is offline Offline
Newbie Poster

Re: clearing picture from picture box

 
0
  #3
Jul 2nd, 2007
sir, the code
picture1.cls
will clear the entire picutre box what I want is to clear only one picture from the existing pictures inside the picture box.
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 31
Reputation: ~Paul~ is an unknown quantity at this point 
Solved Threads: 0
~Paul~ ~Paul~ is offline Offline
Light Poster

Re: clearing picture from picture box

 
0
  #4
Jul 4th, 2007
  1. picture1.Picture = New StdPicture
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 848
Reputation: QVeen72 is on a distinguished road 
Solved Threads: 120
QVeen72's Avatar
QVeen72 QVeen72 is offline Offline
Practically a Posting Shark

Re: clearing picture from picture box

 
0
  #5
Jul 4th, 2007
Hi,

Keep a Dummy Picture Box on the Form Say DPict

use this Code:
DPict.Picture = LoadPicture 'Clear Pict
Picture1.PaintPicture DPict.Image, 2000, 0, 2000, 1000
Picture1.Refresh

This Clears the Picture stored in Area :
2000, 0
And Width=2000, Height 1000


Regards
Veena
Last edited by QVeen72; Jul 4th, 2007 at 5:26 am. Reason: Slight Change in Code
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC