PRB: Problem Changing Control's Picture to (None) in VB 3.0
ID: Q108602
|
The information in this article applies to:
-
Microsoft Visual Basic Professional Edition for Windows, version 3.0
SYMPTOMS
You can attach a graphic to a form or picture control using the Picture
property in Visual Basic. By default, Visual Basic gives a value of
(none) for the Picture property in the Properties window. After you
attach a graphic to a form or picture control, the Picture property has
a value of (bitmap), (icon), or (metafile).
However, Visual Basic can prevent your attempts to detach the graphic.
Highlighting the (bitmap), (icon), or (metafile) value and pressing DEL
can fail to change the value to (none).
Please note that this reference to the DEL key refers to the DEL key on the
numeric keypad, not the DELETE key on the main keyboard.
NOTE: The three dots on the right of the Settings box for the Picture
property do not pop up a choice for (none). Visual Basic requires you
to use the DEL key to change the Picture property value to (none).
CAUSE
Visual Basic requires you to click the Picture property in the
Properties list immediately before highlighting the (bitmap), (icon),
or (metafile) value for deletion. Visual Basic requires that click
even if the Picture property has the focus from a previous operation.
WORKAROUND
To work around this behavior, click the Picture property in the
Properties list before highlighting the (bitmap), (icon), or (metafile)
value. Or, change the focus to any other property on the Properties
window, then reselect the Picture property. The DEL key then
correctly deletes the (bitmap), (icon), or (metafile) value and changes
the value to (none). The graphic correctly disappears from the form or
picture control.
STATUS
This behavior is under review and will be considered for correction in a
future release.
MORE INFORMATION
Steps to Reproduce the Behavior
The following steps set the Picture property to (bitmap), (icon), or
(metafile):
- Start a new project in Visual Basic. Form1 is created by default.
- Press the F4 key. Select the Picture property from the list in the
Properties window.
- Click the three dots on the right of the Settings box. Visual Basic
displays a dialog box from which you select a picture file. The
graphic from the picture file displays on the form.
- Click the form to see the graphic. This changes the focus to the form.
- Press the F4 key to give focus back to the Properties window.
NOTE: The Picture property is still highlighted on the list in the
Properties window. To duplicate the behavior, don't click the Picture
property until the workaround is explained further below.
- In the Settings box in the Properties window, highlight or double-click
the word (bitmap), (icon), or (metafile). Press the DEL key. This fails
to change the value to (none).
To work around this behavior, click the Picture property in the
Properties list before highlighting the (bitmap), (icon), or (metafile)
value. Or, change the focus to any other property on the Properties
window, then reselect the Picture property. Then highlight the (bitmap),
(icon), or (metafile) value. Press the DEL key to delete the value. This
successfully changes the value to (none) and removes the graphic from
the form.
REFERENCES
"Microsoft Visual Basic Version 3.0: Programmer's Guide", Page 324.
Additional query words:
3.00 bitmap bitmaps .BMP .WMF .ICO .DIB
Keywords :
Version : WINDOWS:3.0
Platform : WINDOWS
Issue type :