BUG: @...SAY Prints Gray BackgroundLast reviewed: December 15, 1997Article ID: Q154170 |
The information in this article applies to:
SYMPTOMSIt is possible that @...SAYs prints with a gray or dark-shaded background when printed from Windows 95 or Windows NT 4.0 using either Microsoft Visual FoxPro for Windows or FoxPro for Windows 2.6. This problem can be encountered with all versions of Windows. However, it appears more often under Windows 95 and Windows NT 4.0.
CAUSEThere are several reasons why @...SAYS may print a shaded background. It could be because the window color is set to a color other than white in the Windows 95 or Windows NT 4.0 Display Properties. In Microsoft Visual FoxPro and FoxPro for Windows 2.6, the background color of the desktop will affect the @...SAYs used in programs. Also, if the @...SAY code is executed from a form in Microsoft Visual FoxPro or a screen in Microsoft FoxPro for Windows 2.6, the background color of these objects will affect printout
WORKAROUNDTo change the background color of all windows under Windows 95 or Windows NT 4.0, the Window color must be changed in the Appearance tab of the Display Properties. To change this property, alternate-click on the Windows 95 or Windows NT 4.0 desktop and select Properties from the Shortcut menu. This will bring up the Display Properties window. Click on the Appearance tab, and then select Window in the drop-down list under Item. From the color picker, choose white. This option may not be desirable because users will have to keep the window color white anytime they print in @..SAYs from FoxPro under Windows 95 or Windows NT 4.0. A better way to implement this is to check the background color of the window or desktop from the code, the form, or the screen prior to issuing the @...SAY. Below are the steps to implement this with Microsoft Visual FoxPro 3.0 and Microsoft FoxPro for Windows 2.6. If the @...SAY code is executed from a program in Visual FoxPro for Windows, the window color can be changed with the following code:
IF _Screen.BackColor != 16777215 &&Is color value white? _Screen.LockScreen = .T. &&Keep screen from flashing cOldbackcolor = _Screen.BackColor &&Save background color _Screen.BackColor = RGB(255,255,255) &&Set BackColor to RGB white, &&Same as color value 16777215 SET DEVICE TO PRINTER @1,1 say 'This is a test.' SET DEVICE TO SCREEN SET PRINTER TO _Screen.BackColor = cOldbackcolor _Screen.LockScreen = .F. ENDIFIf the @...SAY code is executed from a form in Visual FoxPro for Windows, the form's background color can be modified with the following code:
IF ThisForm.BackColor != 16777215 ThisForm.LockScreen = .T. SET DEVICE TO PRINTER cOldbackcolor = ThisForm.BackColor ThisForm.BackColor = RGB(255,255,255) @1,1 SAY 'This is a test' SET DEVICE TO SCREEN SET PRINTER TO ThisForm.BackColor = cOldbackcolor ThisForm.LockScreen = .F. ENDIF NOTE: This code may be placed in the Click event of a Command button.In FoxPro for Windows 2.6, use the following code to change the window color:
cOldscheme = SET('Color of Scheme 1') &&Obtain old color MODIFY WINDOW SCREEN COLOR RGB(0,0,0,255,255,255) &&Set color white SET DEVICE TO PRINTER @1,1 say ' This is a test.' SET DEVICE TO SCREEN SET PRINTER TO MODIFY WINDOW SCREEN COLOR &cOldscheme STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATIONIf the @...SAY code is executed from Visual FoxPro for Windows with Windows 95 or Windows NT 4.0 as the operating system, all printed pages will be shaded. Using FoxPro for Windows 2.6 and Windows 95 or Windows NT 4.0, only the first page is shaded. All others print normally.
Steps to Reproduce Behavior
|
KBCategory: kbprint kbbuglist
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |