How to Enable the Windows 95 Size Grip in a VB Form

Last reviewed: May 2, 1996
Article ID: Q143262
The information in this article applies to:
  • Standard, Professional, and Enterprise Editions of Microsoft Visual Basic, version 4.0, for Windows

SUMMARY

There are two ways to enable the Windows 95 Style Size Grip on the lower- right corner of a Microsoft Visual Basic 4.0 Form.

MORE INFORMATION

The Windows 95 Style Size Grip appears on certain forms and signals to the user that the form is resizable.

There are two ways to enable the Size Grip icon to appear at the lower- right of a Visual Basic 4.0 Form.

  • The first way is to use the Windows 95 Status Bar Control, currently found in the Comctl OLE Custom Control module, COMCTL32.OCX. This custom control when placed, positions itself at the bottom of the form and the size grip automatically appears on the right end of the control when the form is sizable.
  • The second way is to place a TextBox on the form so that the lower-right corner is located on the lower-right corner of the form. You must then set the following properties for the TextBox in the Properties Window:

          Text1.Multiline = True
    
          Text1.Scrollbars = 3    'Both
    
       Also, adjust the Height and Width properties of the TextBox whenever the
       form is resized. You can do it this way:
    
          Private Sub FormName_Resize()
    
             Dim x as long, y as long 'where x and y are scaled values that you
                                      'use to take into account the fact that
                                      'the TextBox should be a little less wide
                                      'and high than the form. You should
                                      'initialize these to constant values.
             x = 500
             y = 500
    
             Text1.Height = Form1.Height - x
             Text1.Width = Form1.Width - y
    
          End Sub
    


Additional reference words: 4.00 vb4win Status Bar Size Grip Resize Icon
KBCategory: kbusage
KBSubcategory: Prg PrgCtrls


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: May 2, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.