Microsoft KB Archive/80938

= 3-D Group Push Button: AutoSize Takes Effect Only on PictureUp =

Article ID: 80938

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 Q80938



SUMMARY
The 3-D Group Push Button (THREED.VBX) custom control will not automatically size itself to the bitmap assigned to the PictureDown property. When the AutoSize property is set to &quot;2 - Adjust Button Size to Picture,&quot; the 3-D Group Push Button custom control will automatically size itself to the bitmap assigned to the PictureUp property. This behavior is by design.

This information applies to Microsoft Professional Toolkit for Microsoft Visual Basic programming system version 1.0 for Windows.



MORE INFORMATION
The Visual Basic 3-D Group Push Button custom control can have a bitmap assigned to the button when it is in the down position, and another bitmap when the button is in the up position (the PictureUp and PictureDown properties are set to different .BMP files at design time). However, the 3-D Group Push Button control will not automatically size itself to the size of the picture assigned to the PictureDown property even if the AutoSize property is set to &quot;2 - Adjust Button Size to Picture.&quot;

When the AutoSize property is set to &quot;2 - Adjust Button Size to Picture,&quot; the 3-D Group Push Button custom control will automatically size itself to the bitmap assigned to the PictureUp property. This means that the button will size itself to the picture it is supposed to display only when it is in the up position. If there is a bitmap assigned to the PictureDown property and this picture is bigger than the 3-D Group Push Button control, this picture will appear clipped when the button is pressed.

The following steps demonstrate how the 3-D Group Push Button custom control does not size itself to the bitmap assigned to the PictureDown property even when the AutoSize property for the control is set to &quot;2 - Adjust Button Size to Picture.&quot;

Example

 * 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 THREED.VBX custom control file.
 * 3) Click the Toolbox to select the 3-D Group Push Button control.
 * 4) Click and drag on the form to place a 3-D Group Push Button control.
 * 5) Change the AutoSize property in the Properties Bar to &quot;2 - Adjust Button Size to Picture&quot; (this is the default setting).
 * 6) Change the PictureDown property in the Properties Bar by choosing a bitmap file from the Properties list box. Note that &quot;(none)&quot; is first displayed, because no picture is assigned by default. You can click the button with three dots on the right of the Properties list box to choose a bitmap file.
 * 7) From the Run menu, choose Start to run the application.
 * 8) Click the 3-D Group Push Button to push it into the down position.

The picture that is assigned to the PictureDown property is displayed. If the picture happens to be larger than the 3-D Group Push Button control, the picture will appear clipped. If the picture chosen was smaller, the background of the 3-D Group Push Button control will show. In either case, the 3-D Group Push Button control did not resize itself to the picture once the button was pressed.

If you assign a picture to the PictureUp property of the 3-D Group Push Button control, the button will automatically size itself to this picture. Nonetheless, the 3-D Group Push Button control will not size itself to the picture assigned to the PictureDown property once the button is pressed.

Additional query words: 2.00 3.00

Keywords: KB80938

-

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

© Microsoft Corporation. All rights reserved.