FIX: Out of Memory w/ Var Named ClientLeft/Top/Width/Height

Last reviewed: October 30, 1997
Article ID: Q102069
3.00 WINDOWS kbprg kbbuglist

The information in this article applies to:

- Standard and Professional Editions of Microsoft Visual Basic for

  Windows, version 3.0

SYMPTOMS

When you use a variable named ClientLeft, ClientTop, ClientWidth, or ClientHeight without explicitly defining the variable with Dim or Global, Visual Basic incorrectly generates the error "Out of memory - insufficient variable space," error code 3761.

WORKAROUND

Define the variable using Dim or Global. For example:

   Dim ClientLeft As Single

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This problem has been corrected in Visual Basic version 4.0.

MORE INFORMATION

Steps to Reproduce Problem

Sub Form_Click ()
    ' any of the following statements cause the error
    Print ClientLeft
    Print ClientTop
    Print ClientWidth
    Print ClientHeight
End Sub


Additional reference words: buglist3.00 buglist3.00 fixlist4.00
KBCategory: kbprg kbbuglist
KBSubcategory: PrgOther
Keywords : PrgOther kbbuglist kbprg
Version : 3.00
Platform : WINDOWS
Solution Type : kbfix


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: October 30, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.