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

Recommended Answers

Hi,

Just use:

Picture1.Cls

Regards
Veena

Jump to Post
picture1.Picture = New StdPicture

;)

Jump to Post

All 7 Replies

Hi,

Just use:

Picture1.Cls

Regards
Veena

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.

picture1.Picture = New StdPicture

;)

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

image1.visible= False
image1.picture= Nothing

try a simpler approach

image1.picture=nothing

  • **picture1.open=loadpicture("m.jpg")
  • picture1.cls
  • msgbox"r u sure want to delete"
  • picture1.refresh**
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.