How to Clear VB Picture Property at Run Time Using LoadPicture

ID Number: Q80488

1.00

WINDOWS

Summary:

During execution of a Visual Basic program, you can clear the picture

property of a form or picture control using the LoadPicture function.

Calling LoadPicture with no parameters and assigning the result to the

Picture property of a form or control will clear the picture property.

This information applies to Microsoft Visual Basic programming system

version 1.0 for Windows.

More Information:

This information is documented in the online Help for Visual Basic

(VB.EXE) under the LoadPicture function.

Code Example

------------

To clear the picture property at run time, do the following:

1. Start Visual Basic.

2. Make a picture box called Picture1.

3. Assign a bitmap or icon the picture1.picture property.

4. Add the following code to the form1.click event by double-clicking

the form:

Sub Form_Click ()

picture1.picture = LoadPicture()

End Sub

5. Run the program.

6. Click on the form.

Additional reference words: 1.00