Microsoft KB Archive/126583

= PRB: Printer Setup Is Disabled When Using _MFI_SETUP in Menu =

Article ID: 126583

Article Last Modified on 12/3/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft FoxPro 2.5b
 * Microsoft FoxPro 2.5a
 * Microsoft FoxPro 2.5b
 * Microsoft FoxPro 2.6 Standard Edition
 * Microsoft FoxPro 2.6a Standard Edition
 * Microsoft FoxPro 2.5b for Macintosh
 * Microsoft Visual FoxPro 2.5c for Macintosh
 * Microsoft FoxPro 2.6a Professional Edition for Macintosh

-



This article was previously published under Q126583



SYMPTOMS
The Printer Setup option of your menu is disabled.



CAUSE
The system menu option "_MFI_SETUP" exists as a menu command in your menu. When there is no text to be printed in the active window, FoxPro disables the Printer Setup option menu choice, and because the _MFI_SETUP variable is context-aware, it is enabled and disabled accordingly.



WORKAROUND
Use one of the following three workarounds:   Use the SYS(1037) function. This is the best workaround, but it works only if you are using version 2.6 or later of FoxPro for Windows or version 2.5 or later of FoxPro for Macintosh.

To invoke the printer setup dialog regardless of what is displayed on the screen, use the following code as a Command in your menu: ? SYS(1037) The Help file for FoxPro version 2.6 and 2.6a, in both the MS-DOS and Windows versions, is partially incorrect in that it states that this command is Macintosh-specific and will be ignored in the Windows and MS-DOS Versions of FoxPro. SYS(1037) works in FoxPro versions 2.6 and 2.6a for Windows, but not in other versions. -or-

 Issue the command Set PDSETUP TO '?' as the command for your menu pad. This invokes the MS-DOS printer driver setup without invoking the Windows Printer Setup. -or-

  Issue the RUN command as in this example: RUN /N7 CONTROL MAIN.CPL PRINTERS This invokes the Control Panel, Printers option. However this is a less desirable workaround because, as noted in article 101154, this causes the control panel to flash momentarily in the background. This command is specific to Windows only. 



STATUS
This behavior is by design.



Steps to Reproduce Behavior
Create and run a program containing the following code: **-**  ** Place this code in a file called MENU.MPR               ** **-**  SET SYSMENU TO   SET SYSMENU AUTOMATIC DEFINE PAD testpad OF _msysmenu PROMPT "System" COLOR SCHEME 3 ON PAD testpad OF _msysmenu ACTIVATE POPUP SYSTEM DEFINE POPUP SYSTEM MARGIN RELATIVE SHADOW COLOR SCHEME 4 DEFINE BAR _mfi_setup OF SYSTEM PROMPT "Printer Setup..."

****  ** Place this code in a file called MENU.PRG              ** ****  Terminate = .F.   ON KEY LABEL f5 Do Stopit DO menu.mpr READ VALID terminate SET SYSMENU TO DEFAULT

Procedure Stopit STORE .T. TO terminate clear Read While running the program, you can access the menu pad labeled SYSTEM, but the Printer Setup option is disabled.

Additional query words: VFoxWin FoxWin 2.50 _MFI_SETUP PDSETUP print menu setup exe disabled

Keywords: kbprb KB126583

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.