ID Number: Q84930
1.00
WINDOWS
buglist1.00
Summary:
The Animated Button (ANIBUTON.VBX) custom control Height and Width
properties incorrectly reflect changes made to them at run time and
design time when PictDrawMode = 1 (Autosize control). The changes are
correctly not reflected in the size of the control, but are
incorrectly reflected in the AniButton1.Width and AniButton1.Height
property values. You would expect with PictDrawMode = 1, (Autosize
control) that Height and Width properties would remain at the values
set by Autosize, regardless of the values they were set within the
program. This could possibly cause problems with programs that take
action based on the width or height values of the Animated Button
control.
However, the Height and Width property values will not go below the
threshold required to display any captions and/or borders specified.
The threshold width and height values are determined by the size and
type of font being used for the caption or size of the picture, and
whether or not a border is displayed. The steps below demonstrate the
problem.
Microsoft has confirmed this to be a problem with the Animated Button
custom control supplied with Microsoft Professional Toolkit for
Microsoft Visual Basic programming system version 1.0 for Windows. We
are researching this problem and will post new information here as it
becomes available.
More Information:
Steps to Reproduce Problem
--------------------------
1. Run Visual Basic, or from the File menu, choose New Project (ALT,
F, N) if Visual Basic is already running. Form1 is created by
default.
2. From the File menu, choose Add File. In the Files box, select the
ANIBUTON.VBX custom control file. The Animated Button tool appears
in the Toolbox.
3. Place an Animated Button (AniButton1) on Form1.
4. Set the Caption property of AniButton1 to any string value.
5. Set the PictDrawMode property to 1 (Autosize control.) This means
the control will be sized according to the size of the Caption or
Picture property, whichever is larger.
6. Press F5 to run the program.
7. From the Run menu, choose Break. The Immediate window will receive
the focus.
Add the following code to the Immediate window
Print AniButton1.Width
Print AniButton1.Height
and press ENTER. You will get the values based on the current width
and height of AniButton1. Add the following to the Immediate
window:
AniButton1.Width = 1000
AniButton1.Height = 1000
The control acts as it should, and does not change size. Check the
value of the Width and Height properties; notice they are now 1000,
even though the control is sized as before. If you attempt to set the
Height or Width values to a very small value, such as 1, the values
will revert to those set by the PictDrawMode = 1.
Additional reference words: 1.00