BUG: Microsoft Grid Control Cannot Load a Metafile

Last reviewed: August 12, 1997
Article ID: Q172121
The information in this article applies to:
  • Standard, Professional, and Enterprise Editions of Microsoft Visual Basic for Windows, 16-bit and 32-bit, version 4.0

SUMMARY

The documentation for the Microsoft Grid control (the Picture property description for the Grid control in the Help file) states that it is able to load a metafile into the Picture property. This is incorrect for the Microsoft Grid control, but valid for the controls listed in the Applies To >>reference?<< for the Picture Property. The Microsoft Grid control can only load bitmaps and icons into the Picture property.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps To Reproduce the Problem

  1. Start a new project in Visual Basic. Form1 is created by default.

  2. Place a Microsoft Grid Control on to Form1.

  3. In the Load event for Form1, place the following code:

       Private Sub Form_Load()
           Grid1.Picture = LoadPicture("C:\VB4\metafile\arrows\2DARROW1.WMF")
       End Sub
    
    

  4. Run the project by pressing the F5 key. The following error message is received:

          Run-time error '30008'
          Not a valid Picture type
    
Keywords          : PrgCtrls VB4ALL VB4WIN
Version           : 4.0
Issue type        : kbbug


================================================================================


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