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

Last reviewed: June 21, 1995
Article ID: Q80938
The information in this article applies to:
  • Standard and Professional Editions of Microsoft Visual Basic for Windows, versions 2.0 and 3.0
  • Microsoft Visual Basic programming system for Windows, version 1.0

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 "2 - Adjust Button Size to Picture," 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 "2 - Adjust Button Size to Picture."

When the AutoSize property is set to "2 - Adjust Button Size to Picture," 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 "2 - Adjust Button Size to Picture."

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 "2 - Adjust Button Size to Picture" (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 "(none)" 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 reference words: 1.00 2.00 3.00
KBCategory: kbprg
KBSubcategory: PrgCtrlsCus


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: June 21, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.