HOWTO: Enable the Windows 95/Windows 98 Size Grip in a VB Form

ID: Q143262


The information in this article applies to:
  • Microsoft Visual Basic for Windows Learning, Professional, and Enterprise Editions, versions 5.0, 6.0
  • Standard, Professional, and Enterprise Editions of Microsoft Visual Basic, version 4.0, for Windows


SUMMARY

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


MORE INFORMATION

The Windows 95/98 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 Form.

  • The first way is to use the Status Bar Control, which is part of Windows Common Controls 6.0 (MSCOMCTL.OCX). This control 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 always 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 


The following code demonstrates using a text box in this way:

        Const x = 100       'where x and y are scaled values that you
        Const y = 385       '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.

        Private Sub Form_Load()
            Text1.Left = 0
            Text1.Top = 0
            Text1.Width = Me.Width - x
            Text1.Height = Me.Height - y
        End Sub

        Private Sub Form_Resize()
            Text1.Width = Me.Width - x
            Text1.Height = Me.Height - y
        End Sub 

Additional query words: kbVBp400 kbVBp500 kbVBp600 kbVBp kbdsd kbDSupport kbVBA

Keywords : kbGrpVB
Version :
Platform : WINDOWS
Issue type : kbhowto


Last Reviewed: January 5, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.