PRB: Bitmap Appears Differently in General Field

Last reviewed: October 24, 1997
Article ID: Q175612
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, versions 5.0, 5.0a

SYMPTOMS

The general field image of a bitmap differs in appearance depending on the method used to place the bitmap in the field. Placing a bitmap into a general field using the APPEND GENERAL command or the Insert Object option of the Edit menu bar causes the visual size of the bitmap to increase and the picture quality to decrease when compared to viewing the same file in Microsoft Paint. However, opening the bitmap in Microsoft Paint, copying the image to the Windows clipboard, and pasting it into the general field produces an image that retains the characteristics of the image in Microsoft Paint.

STATUS

Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

When a bitmap is stored into a general field, Visual FoxPro stores the object as native data and presentation data. The combination of native and presentation data represents the "Binary Large Object Bitmap." Opening the general field by double-clicking displays the presentation data. The native data appears in the default OLE server, in this case Microsoft Paint, after double-clicking on the presentation data. Apparently, Visual FoxPro displays the presentation data differently based on the method used to insert the image.

In Visual FoxPro 3.0b, the presentation data may appear correctly depending on the video display settings. For instance, an 800x600 resolution setting displays the data correctly. However, other video display resolutions may cause a problem similar to that described in Visual FoxPro 5.0x.

Steps to Reproduce Behavior

  1. Create a table that contains a general field, named gentest, and add three records to the table.

  2. Browse the table, go to the first record, and double-click on the general field.

  3. Start Microsoft Paint and open Setup.bmp in Windows 95 or Winnt.bmp in Windows NT 4.0.

  4. Click the Edit menu and then click Select All and Copy. This copies the bitmap to the Windows Clipboard.

  5. Switch back to Visual FoxPro and select Paste from the Edit menu. This copies the bitmap into the general field. Close the general field and move to the second record.

  6. Type the following command into the Command window:

          APPEND GENERAL gentest from c:\winnt\winnt.bmp
    

    -or-

          APPEND GENERAL gentest FROM c:\win95\setup.bmp
    

    NOTE: The actual names of the operating system folder may vary.

  7. Move to the last record and double click on the general field.

  8. From the Edit menu, click Insert Object and Create From File.

  9. Locate either Setup.bmp or Winnt.bmp and highlight it. Then choose Open. Finally, click OK and close the general field.

  10. Open the first general field and notice that the bitmap image is the same size and it appeared in Microsoft Paint. Next, move to the second record and open the general field. The image appears both larger than the same image did in Microsoft Paint, and the picture quality is lower. The image added with the Insert Object menu option in the third record has the same appearance.

REFERENCES

Inside OLE Second Edition, Kraig Brockschmidt,833-834, Microsoft Press, 1995

Keywords          : FxinteropGeneral vfoxwin
Version           : WINDOWS:5.0,5.0a
Platform          : WINDOWS
Issue type        : kbprb
Solution Type     : kbpending


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


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