Microsoft KB Archive/80488

= How to Clear VB Picture Property at Run Time Using LoadPicture =

Article ID: 80488

Article Last Modified on 12/12/2003

-

APPLIES TO


 * Microsoft Visual Basic 2.0 Standard Edition
 * Microsoft Visual Basic 3.0 Professional Edition
 * Microsoft Visual Basic 2.0 Professional Edition
 * Microsoft Visual Basic 3.0 Professional Edition
 * Microsoft Visual Basic 1.0 Standard Edition

-



This article was previously published under Q80488



SUMMARY
During execution of a Visual Basic program, you can clear the Picture property of a form or picture control by 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.



MORE INFORMATION
This information is documented in the Visual Basic Help menu under the LoadPicture function.

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

 Start Visual Basic. Make a picture box called Picture1. Assign a bitmap or icon the picture1.picture property.  Add the following code to the form1.click event by double-clicking the form: Sub Form_Click picture1.picture = LoadPicture End Sub  Run the program. Click the form.</ol>

Additional query words: 2.00 3.00

Keywords: KB80488

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.