Microsoft KB Archive/175612
Article ID: 175612
Article Last Modified on 8/24/1999
- Microsoft Visual FoxPro 5.0 Standard Edition
- Microsoft Visual FoxPro 5.0a
This article was previously published under Q175612
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.
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.
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
- Create a table that contains a general field, named gentest, and add three records to the table.
- Browse the table, go to the first record, and double-click on the general field.
- Start Microsoft Paint and open Setup.bmp in Windows 95 or Winnt.bmp in Windows NT 4.0.
- Click the Edit menu and then click Select All and Copy. This copies the bitmap to the Windows Clipboard.
- 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.
Type the following command into the Command window:
APPEND GENERAL gentest from c:\winnt\winnt.bmp
APPEND GENERAL gentest FROM c:\win95\setup.bmp
NOTE: The actual names of the operating system folder may vary.
- Move to the last record and double-click on the general field.
- From the Edit menu, click Insert Object and Create From File.
- Locate either Setup.bmp or Winnt.bmp and highlight it. Then choose Open. Finally, click OK and close the general field.
- 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.
Inside OLE Second Edition, Kraig Brockschmidt,833-834, Microsoft Press, 1995
Keywords: kbnofix kbprb KB175612