PSSQA.TXT Answers to Questions About FoxPro Version 2.60aLast reviewed: April 30, 1996Article ID: Q121266 |
The information in this article applies to:
SUMMARYThe information below is based on the complete FoxPro 2.6a for Windows PSSQA.TXT file found in the main FoxPro directory (usually FPW26).
MORE INFORMATION
PSSQA.TXT********************************************************** Answers to Commonly Asked Questions About Microsoft(R) FoxPro(R) for Windows(TM) Version 2.6a (C)1994 Microsoft Corporation. All Rights Reserved.**********************************************************
CONTENTS
Part 1: Cross-Platform
Overview of Questions
Question 1Can I create a FoxPro for Windows application using FoxPro for MS-DOS?
Answer 1FoxPro for Windows can execute applications you create with FoxPro for MS-DOS without you making any changes to the appplications. The FoxPro for MS-DOS power tools, however, don't support features that are specific to the Windows environment. You can write your own code to add these Windows features, but we don't recommend this approach to cross-platform application development.
Question 2I have an existing FoxPro 2.0 project. How do I enable it to run in FoxPro version 2.6?
Answer 2You open the project in FoxPro version 2.6 and rebuild your application. You must convert screens and reports only if you decide to modify them.
Question 3Will I be able to create executable files for FoxPro version 2.6?
Answer 3Yes. The options for building .EXE files in FoxPro 2.6 for MS-DOS are the same as in FoxPro 2.0. You can build compact and stand-alone .EXE files. Compact .EXE files are distributed with library files that are included in the FoxPro Distribution Kit. Stand-alone .EXE files don't require the FoxPro library files. The information from the libraries is built into a stand-alone .EXE. In FoxPro for Windows, you can create the equivalent of the compact .EXE file. These files are distributed with the library files included in the FoxPro for Windows Distribution Kit.
Question 4Why doesn't my Low Level File I/O program work in the Windows Product?
Answer 4FoxPro for Windows can not access the COM ports with the Low Level File commands. This is documented if you look at the FOPEN() command, but many people who are accustomed to opening a port in the MS-DOS product would test this function and think it is broken. This is not a bug - it is product design. In the Windows multi-tasking environment, other applications besides FoxPro may also be using the COM ports. It is not desirable to allow a Windows-based application to take exclusive control of the communications port. Access to the COM port would be provided through FoxTools.FLL and the Windows API calls. In the FPW26\goodies\foxtools directory is a file called dialer.prg This shows an example of using the com port under the Windows environment. The use of the REGFN() and CALLFN() are documented in the FOXTOOLS.WRI file in the same directory as the example. Refer to the Windows SDK documentation for information on specific API calls.
Part 2: Interface Features
Overview of Questions
Question 1Why do the windows created in FoxPro for Windows have different style controls when compared with the windows in FoxPro for MS-DOS?
Answer 1FoxPro for Windows is designed to conform to the Windows version 3.1 interface guidelines for applications. These guidelines enable you to use the same methods of moving, selecting, and changing windows with all Windows-based applications. FoxPro windows now include Control-menu boxes and Minimize, Maximize, and Restore buttons. For a complete discussion of window styles and terminology, refer to the Getting Started manual.
Question 2What is the purpose of the Control-menu box at the top left of FoxPro windows?
Answer 2A single click in the Control-menu box displays the Control menu, with which you can move, size, close, and select windows. A double-click in the Control-menu box closes the window.
Question 3Why is it that I can resize some windows in FoxPro and not others?
Answer 3FoxPro for Windows contains windows you can size and windows you can't size. Windows that contain a text-editing region are sizable. Examples of sizable windows are the Command window, Screen Design window, and the Calendar. These windows may contain scroll bars and a sizing box in the bottom right corner of the window. Examples of windows you can't size include the View and RQBE windows. Windows you can't size have only the Control-menu box and the Minimize button.
Question 4Why have the keyboard shortcuts in FoxPro for Windows changed? Is there a way to restore the FoxPro for MS-DOS style keystrokes?
Answer 4FoxPro for Windows supports Windows-style keystrokes, such as using ENTER to choose a focused selection. FoxPro for Windows supports both an MS-DOS keystroke mode and Windows keystroke mode. Refer to the FoxPro online help for details on the keystroke differences. You were asked at installation time which mode to select. However, you can change the mode interactively at any time in FoxPro by issuing the command:
SET KEYCOMP TO DOS -or- SET KEYCOMP TO WINDOWSEach time you load FoxPro, the default KEYCOMP setting you specify during installation will be in effect. To change the default setting of KEYCOMP, include the appropriate statement the CONFIG.FPW file:
KEYCOMP=DOS -or- KEYCOMP=WINDOWS Question 5When I create a table and press ENTER to add a new field, I find that the dialog unexpectedly closes. Why is this?
Answer 5The keystroke navigation is different in Windows and MS-DOS. In FoxPro for MS-DOS, the keystroke equivalent of clicking the focus button is CTRL+ENTER. In Windows, it is ENTER. So pressing ENTER in the Table Structure dialog tells FoxPro you chose the OK button. To establish the MS-DOS keystroke mode in Windows, issue the command SET KEYCOMP TO DOS.
Question 6FoxPro for Windows automatically displays a status bar located at the bottom of the main window. Is it possible to remove this status bar? Is the MS-DOS style status bar available?
Answer 6The Windows-style status bar displays the same information as the MS-DOS style status bar, plus information about the currently selected menu name or command and messages you create using FoxPro commands. It can also display the system time. The Windows-style status bar is displayed by default. To remove the status bar, in the Command window issue this command:
SET STATUS BAR OFFAlternatively, in CONFIG.FPW enter this item:
STATUS BAR = OFFTo restore the status bar, substitute ON for OFF in the previous two examples. The SET MESSAGE TO command you use to specify a message location is ignored when the Windows style status bar is active. When the Windows-style status bar is active, messages you create with commands such as DEFINE MENU, DEFINE POPUP, DEFINE BAR, and @...PROMPT appear in the Windows-style status bar. When the Windows-style status bar is active, to display the time on the right hand side of the status bar issue this command:
SET CLOCK STATUSAlternatively, in CONFIG.FPW enter this item:
CLOCK = STATUSFor compatibility with existing FoxPro version 2.0 applications, FoxPro for Windows displays the MS-DOS style status bar when you issue the command SET STATUS ON.
Question 7In FoxPro for Windows, when I issue the command SET DISPLAY TO VGA50 and then issue the command SET DISPLAY TO VGA25 to restore the previous setting, the status bar disappears. How do I restore the status bar?
Answer 7Issue the SET STATUS BAR ON command.
Question 8Why has the menu for FoxPro for Windows changed? Is the MS-DOS version of the menu available?
Answer 8The menu in FoxPro for Windows has been modified for consistency with the standard Windows interface. The System menu on the FoxPro version 2.0 menu bar has been removed and a number of specific menu items have been moved. Take a moment to explore the new menu structure. Note that a brief message describing each menu item is displayed in the status bar at the bottom of the main FoxPro window. If you are more comfortable with the menu bar layout of FoxPro version 2.0, you can run a distributed FoxPro menu program that recreates it. Generate the menu first, and then execute the DOS.MPR file located in the GOODIES subdirectory with the DO command. Running this menu program replaces the FoxPro for Windows menu bar layout with the FoxPro for MS-DOS menu bar layout while retaining the Text menu for multiple font support. To automatically display the FoxPro for MS-DOS menu bar when you load FoxPro for Windows, place the following item in the CONFIG.FPW file to execute the DOS.MPR program:
COMMAND = DO C:\FPW26\GOODIES\DOS\DOS.MPRModify the path specification for DOS.MPR based on your specific installation.
Question 9The Edit menu contains a number of new options such as Paste Special... and Change Link... . How do I use these options?
Answer 9The new Edit menu options support Object Linking and Embedding (OLE). The items include Paste Special, Insert Object, Object, Change Link, and Convert to Static. For a detailed discussion of OLE consult the FoxPro documentation.
Question 10The Program menu contains the new option, Beautify. What does it do?
Answer 10The Beautify option alters the appearance of program files so they are easier to read. For example, you can choose to alter the case of key words and variables and to add indentation within procedures and DO CASE statements. You can also highlight program organization by bracketing specific control statements such as:
IF DO something ELSE DO something ENDIF Question 11The Text menu is completely new. What new features does this menu offer?
Answer 11The Text Menu adds support for multiple fonts and text formatting. The Font option makes all of your installed Windows fonts available within FoxPro. A Font option is also available in the Browse menu for Browse windows. To change the main FoxPro window font, hold down the SHIFT key when you choose the Text menu pad. Then choose the Screen Font... option. The Enlarge Font and Reduce Font options change all text to the next available point size in the current font. To alter the spacing of the text, select the Single Space, 1 1/2 Space, or Double Space option. The Indent option indents the selected group of lines one tab stop. Undent does the opposite by moving a selected group of lines out one tab stop.
Question 12Occasionally the Object menu is available. When does it display and why?
Answer 12The Object menu is available when either the Screen Builder or the Report Writer window is open. As with the Text and Browse menus, the Object menu provides access to fonts. Specific items on the Object menu are enabled and disabled based on the currently selected object. For example, a rectangle drawn in the Screen Design window may have an outline or pen color, a background or fill color, and a fill pattern.
Question 13FoxPro for Windows includes Windows-style help. Is there any way to access the .DBF-style help I used in Fox version 2.0?
Answer 13By default, FoxPro for Windows uses Windows-style help. To access the .DBF-style help, issue this command:
SET HELP TO FOXHELP.DBFPressing the F1 key or choosing Contents from the menu will then open .DBF-style help. To return to the Windows-style help, issue this command:
SET HELP TO FOXHELP.HLPTo change the default help to the .DBF-style help, add the following statement to your CONFIG.FPW file:
HELP = FOXHELP.DBF Question 14Shouldn't a full path rather than just the drive letter display when I issue the following command in the Command window?
? SET("DEFAULT") Answer 14No. This is consistent with FoxPro version 2.0 for MS-DOS. Use CURDIR() to display the path for the current directory.
Part 3: Report Writer
Overview of Questions
Question 1Should I convert all of my FoxPro version 2.0 reports to FoxPro for Windows format?
Answer 1You may not need to. Your existing character reports will run, preview, and print unchanged in FoxPro for Windows. The engine for printing character reports is included in FoxPro for Windows. If you want to include graphical elements such as fonts and pictures in a report, then you can convert the reports to FoxPro for Windows format, or create new graphical reports from scratch.
Question 2I used the Quick Report option to create my initial report. Now I want to add another field. In FoxPro for MS-DOS, the Report menu contained an option called Field... that allowed me to add a single field. What do I do in FoxPro for Windows?
Answer 2You can add new fields by using the field tool located in the toolbox on the left side of the Report Design window. See the FoxPro for Windows User's Guide for additional information on the Report Writer toolbox.
Question 3I have included a memo-type field in my report but only the first line prints. How can I fix this?
Answer 3To display the entire contents of the memo field, you must make the field stretch vertically to fit its contents. Double-click the report field and select the Top - Field Can Stretch option from the Position Relative To item. This field will now enlarge depending on the length of the memo field contents. Select the Page Preview option to view the result.
Question 4When I place a "stretched" memo field in the detail band, I find that the fields that display below the memo field are overwritten by some of the longer memo fields. How do I avoid this?
Answer 4Fields or objects positioned below the memo field are still being displayed in a fixed position even though the memo field is now stretchable. To avoid being overwritten, all objects below the memo field should be positioned relative to the bottom of the Detail band. To accomplish this, double-click each of the fields and select the Bottom option from the Position Relative To item. Select the Page Preview option to view the result. If your report contains side-by-side memo fields, fields with the Bottom option specified will display below the longer of the two memo fields. NOTE: The previous procedure applies to non-stretching fields and other objects, such as lines and text. If you have stretching fields placed below other stretching fields, you don't want to position them "relative to bottom." Stretching fields automatically float below other stretching fields.
Question 5I have placed boxes around several fields in my report. One of these fields is a memo field. How do I make the box stretch to fit the memo field?
Answer 5Double-click the box and select the Stretch With Band option from the Position Relative To item. Rectangles (boxes) and vertical lines can optionally stretch according to the length of the Detail band. NOTE: You won't be able to place a stretching box around a field if the field won't be positioned relative to the top or the bottom of the band. Boxes must be positioned relative to the top or bottom of the band.
Question 6When I attempt to move a text object to a specific location in the Report Design window, the field keeps aligning itself with the nearest grid line. Why is this happening?
Answer 6By default, objects are automatically aligned to the nearest invisible grid lines within the Report Design window. This feature is called Snap to Grid and may be disabled by deselecting the Snap to Grid option from the Report menu.
Question 7How do I design and print multi-column reports in FoxPro version 2.6 for Windows?
Answer 7Select Page Layout... from the Report menu option and use the Columns spinner to select the number of columns. Clicking the up arrow increases the counter value, and clicking the down arrow decreases the counter value. The size of the Report Design window reflects the new column width, and you may need to modify existing field positions. HINT: When creating a new report that will have columns, set the layout before you add any fields.
Question 8When I enlarge the font of objects in my report and print the report, some of the information in the fields is obscured. How can I fix this?
Answer 8You may need to stretch the detail lines or the objects themselves to accommodate the larger font.
Part 4: Screen Builder
Overview of Questions
Question 1I don't own a mouse. How can I create a screen using the keyboard?
Answer 1A mouse is required to create a screen with the Screen Builder.
Question 2The Field dialog in the Screen Design window allows me to create only an input field or an output field. What happened to the Edit field option in the field dialog?
Answer 2The Edit field option is now part of the new Edit Region dialog. To create an edit field, click the edit region tool located on the left side of the Screen Design window. Notice that as you select the tool a brief description appears in the status bar at the bottom of the screen. In the Edit Region dialog the options Select on Entry and Initially Disable Edit Region are new. For additional information on these options, see the Edit Region Dialog topic in Help.
Question 3When I select the push button tool in the Screen Design window, I have a choice of three button types: Normal, Invisible, and Picture. Were these types available in FoxPro version 2.0?
Answer 3FoxPro for Windows has consolidated the Invisible Button and Push Button options into a single dialog. The Picture type push button is new. You can create a picture push button using a bitmap (.BMP) picture file to depict graphically the action the push button represents. You can also use picture files with radio buttons and check boxes in FoxPro for Windows.
Question 4I know how to click and drag objects within the Screen Design window using the Selection pointer tool. Is there an easy way to move objects a small distance?
Answer 4Yes. Select the object to move using the Selection pointer tool and use the arrow keys to move the object one pixel at a time.
Question 5I created a screen for my application to display a number of fields. After creating the application, when I move the cursor from one field to the next, the order in which the cursor moves to the fields isn't what I expect based on the physical arrangement of the fields. How can I change the field access order without changing the physical position of the fields?
Answer 5Return to your original screen in the Screen Design window. From the Screen menu, select the Object Order... option. This option opens the Object Order dialog, where screen objects are listed according to their keyboard access order. To change the access order for the objects, click the button to the left of the object and drag the object to its new keyboard access position. Then rebuild your application to include the new field access order.
Question 6When generating screens in FoxPro version 2.0, I was able to specify what code to generate. Options included adding code to open and close files, to define and release windows, and to create modal screens. Is this option still available?
Answer 6Yes. The Generate Screen dialog contains a More button. Choose this button to view the generate code options.
Question 7The Color option is no longer on the Screen menu. How do I specify colors for my screen objects?
Answer 7To specify colors, first select the object or a group of objects. To modify the background color of the object select Fill Color from the Object menu. To modify the outline and text of an object, select Pen Color from the Object menu. The AUTOMATIC setting will match the Windows color sets. To change the background of the entire screen, choose Layout... from the Screen menu and click the Color option. You may choose a specific color or select a wallpaper pattern by clicking Wallpaper and specifying a specific .BMP file.
Question 8When I use an @... SAY statement to display the contents of a general field, nothing appears. What am I doing wrong?
Answer 8Use the Picture tool to display the contents of a general field. The Field tool can't display a picture.
Question 9I used the Picture tool to add a picture field to my screen and specified the appropriate .BMP file. Please explain in more detail how the options in the area called If Picture and Frame Different Size affect the display of the picture. The options are Clip Picture, Scale Picture - Retain Shape and Scale Picture - Fill the Frame.
Answer 9The following options apply only when the picture and frame are of a different size. Choose Clip Picture if you want to retain the original dimensions of the picture. If the picture is larger than the frame only a portion of the image is displayed beginning with the top-left portion of the picture. Any portion of the picture that extends beyond the frame is hidden. Choose Scale Picture - Retain Shape if you want to retain the overall shape of the picture but fill as much of the frame as possible. The picture is protected from vertical or horizontal distortion. Choose Scale Picture - Fill the Frame if you want to fill the frame completely. The picture is horizontally or vertically distorted as needed to fill the frame. Question 10 I want to create a screen that allows online editing, while a READ is active, of OLE objects stored in a general field. When I add a picture to my screen using the picture tool, I'm not able to edit the displayed .BMP file. Is there a way to do this? Answer 10 Use the Field tool in the Screen Design window to create a general field in your screen. Select the WHEN clause and enter the command MODIFY GENERAL <field name> in the code snippet area. Save the screen and generate your screen and/or application. Now you will be able to edit the bitmap within the screen when the application is running. Question 11 Why can't I type as many characters into an input field as it appears will fit? Answer 11 In a proportional font, each character is given as much horizontal space as it needs and no more. For example, a lowercase "f" requires much less space than an uppercase "W." When an input field displays in a screen, FoxPro calculates the display width of the field by multiplying the number of characters in the table field structure by the average size of a character in the specified font. If the field is filled with characters that are wider than average, the characters don't all fit within the display width of the input field and so the characters scroll. If the field is filled with characters that are narrower than average, the characters don't fill the display width of the input field. Question 12 How do I control the length of a memory variable independent of the size of an input field defined with @ ... GET ... SIZE? Answer 12 Use a picture clause to control the memory variable's length, and an @ ... GET ... SIZE clause to control the width of the input field. Question 13 How can I be sure that a font I choose will be available at the client site? Answer 13 The safest way is to look in your WIN.INI file for fonts that have the words "All res" on the line. These are standard Windows fonts and consequently are those most likely to be available at a client site. Question 14 How do I coordinate Browse Windows with Screens? Answer 14 Page D2-96 of the FoxPro for Windows "Developer's Guide" and page D2-90 of the FoxPro for MS-DOS "DevelopersGuide" give samples for coordinating Browse windows with screens but omits the SAVE clause in the example. If the optional BROWSE parameter SAVE is omitted, the Browse window will close as soon as any other object is clicked. The code example should be changed to read as follows:
IF NOT WVISIBLE("Client List") BROWSE NORMAL NOWAIT NODELETE LAST; TITLE "Client List" ; NOAPPEND NOMENU SAVE FIELDS company ; WHEN showgets() ENDIF IF NOT WVISIBLE("Account Details") SELECT details BROWSE NORMAL NOWAIT NODELETE LAST; TITLE "Client List" ; NOAPPEND NOMENU SAVE ; FIELDS ; Trans_type:10, ; Trans_date:10, ; Amt:7,Service SELECT clients ENDIFQuestion 15 Are the Keyboard Shortcuts for FoxPro for Windows screen builder documented? Answer 15 FoxPro for Windows requires a mouse. MS-DOS users who are used to using the keyboard for creating screens are often confused by the lack of keyboard support in the Screen Builder. In a graphical environment such as Windows, the mouse provides a more effective means of locating and/or moving objects than the keyboard does. To complete the transition from designing with the keyboard to designing with the mouse, icons have been added for every tool in the Screen Builder. These icons take the place of the menu shortcuts that exist in FoxPro for MS-DOS. Question 16 I developed a screen in 1024x768 resolution and it does not appear consistent with lower resolutions such as 640x480. How can I develop a screen that will run on multiple resolutions? Answer 16 Here are a few things to keep in mind:
DO CASE CASE m.resolution = HiRes SET PATH TO scrns1 CASE m.resolution = MedRes SET PATH to scrns2 ...This is particularly easy to implement if you follow the procedure of placing your screen functions in a separate program.
MODIFY WINDOW SCREEN FONT 'Arial',11Using True Type font ensures better scaling between platforms. Keep in mind that True Type Fonts are not available in Windows 3.0.
Part 5: Printer Driver Questions
Overview of Questions1 How do I use @ ... SAY Commands and Control Codes to Print in FP/W.2 How can I edit an existing MS-DOS style printer driver or create a new one.3 How can I invoke the Windows Printer Driver Setup Dialog from a program. 4 How do I access DOS printer drivers in FoxPro Windows?Question 1 How do I use @ ... SAY Commands and Control Codes to Print in FP/W. Answer 1 FoxPro for Windows cannot send control codes directly to a printer using a Windows printer driver. There are two techniques to work around this:
The following examples send control codes to switch an Epson FX-80 dot-matrix printer's compressed mode on and off. NOTE: When using these techniques, do not use any of the ? or ?? commands for output. Only use @ ... SAY commands.
Technique 1: Open the Printer in Raw ModeThere are two ways to open the printer in raw mode:
Issue SET DEVICE TO PRINT and SET PRINTER TO commands to turn off all open print commands. Issue a ??? " " command to open the printer in raw mode. Issue @ ... SAY commands to send control codes and text to the printer. After printing, issue a SET PRINTER TO command to flush the print buffer and return control to the Windows printer driver. The following code demonstrates these steps:
SET DEVICE TO PRINT SET PRINTER TO ??? " " @ 1,0 SAY 'NORMAL TEXT' @ 2,0 SAY CHR(15) && Control code to turn compressed mode on @ 2,0 SAY 'CONDENSED text?' @ 3,0 SAY CHR(18) && Control code to turn compressed mode off @ 3,0 SAY 'NORMAL again' SET DEVICE TO SCREEN SET PRINTER TONOTE: In some circumstances, the last @ ... SAY command may not print. If this problem occurs, add an additional @ ... SAY command that prints a blank line (so that the lost line is just a blank). Use the SET PDSETUP TO <Driver Name> Command: Issue a SET PRINTER TO command to clear the print buffer of all open print commands. Issue a SET PDSETUP TO <driver name> command to open the printer in raw mode. You MUST already have an existing FoxPro 2.0 or 2.6 for MS-DOS printer driver in the current resource file. NOTE: The important property of this command is that setting a FoxPro for MS-DOS printer driver opens the printer in raw mode. The printer driver itself is not used to control printing (that is done though control codes). In fact, any FoxPro for MS-DOS printer driver can be used. Issue a SET DEVICE TO PRINTER command to direct the @ ... SAY commands to the printer. Issue @ ... SAY commands to send control codes and text to the printer. After printing, issue a SET DEVICE TO SCREEN command to redirect the output to the screen. Issue a SET PRINTER TO command to flush the print buffer and return control to the Windows printer driver. The following code demonstrates these steps:
SET PRINTER TO SET PDSETUP TO "Epson" SET DEVICE TO PRINT @ 1, 0 SAY 'NORMAL text' @ 2, 0 SAY CHR(15) && Control code to turn compressed mode on @ 2, 0 SAY 'CONDENSED text' @ 3, 0 SAY CHR(18) && Control code to turn compressed mode on @ 3, 0 SAY 'normal again' SET DEVICE TO SCREEN SET PRINT TO Technique 2: Write to Text File and Copy to Printer PortIssue a SET DEVICE TO FILE <filename> command to direct output to a file. Issue @ ... SAY commands to send control codes or text to the printer. Issue a SET DEVICE TO SCREEN command to redirect output to the screen. Issue a SET SAFETY OFF command so FoxPro for Windows does not confirm copying the output file to the printer port (which it believes to be a file). Issue a COPY FILE <filename> TO <printer port>.DOS command to copy the output file to the printer port. Issue a SET SAFETY ON command to turn safety on again. The following code demonstrates these steps:
SET DEVICE TO FILE output.prn @ 1,0 SAY 'NORMAL text' @ 2,0 SAY CHR(15) && Control code to turn compressed mode on @ 2,0 SAY 'CONDENSED text' @ 3, 0 SAY CHR(18) && Control code to turn compressed mode off @ 3, 0 SAY 'Back to normal text' SET DEVICE TO SCREEN SET SAFETY OFF COPY FILE output.prn TO lpt1.dos SET SAFETY ONWhen Windows prints to a file named LPT1.DOS, MS-DOS interprets the request to open the file LPT1.DOS as a request to send data to the printer port, and it sends the data out through its own printing handler. Because Windows thinks that LPT1.DOS is an MS-DOS file, the Print Manager is not used. Question 2 How can I edit an existing MS-DOS style printer driver or create a new one. Answer 2 In FoxPro for Windows, the SET PDSETUP TO <driver_name> command selects only an existing MS-DOS style printer driver. It cannot edit an existing MS-DOS style printer driver or create a new one. To use the SET PDSETUP TO <driver_name> command in FoxPro for Windows, the current resource file (by default FOXUSER.DBF and its associated memo file, FOXUSER.FPT) must already have an MS-DOS style printer driver loaded. This MS-DOS style printer driver must have been previously created by FoxPro for MS-DOS. FoxPro for Windows normally uses Windows printer drivers for all its printing. Windows printer drivers are changed through the Windows Control Panel. Only use the SET PDSETUP TO <driver_name> command with character-based reports that were created in FoxPro for MS-DOS. NOTE: The SET PDSETUP <driver_name> command has no effect on Windows printer drivers. Question 3 How can I invoke the Windows Printer Driver Setup Dialog from a program. Answer 3 There are two methods to invoke the Windows Printer Driver Setup Dialog. The first method is to use the new function SYS(1037) The second method is to use a RUN command. The following example illustrates this:
RUN /N control printersNOTE: These commands will not work with Windows version 3.0. For example, the RUN /N CONTROL.EXE PRINTERS command will only run the Control Panel; it will not open the Printers dialog box. Question 4 How do I access DOS printer drivers in FoxPro Windows? Answer 4 In FoxPro for Windows, the SET PDSETUP TO <driver_name> command selects only an existing MS-DOS style printer driver. It cannot edit an existing MS-DOS style printer driver or create a new one. To use the SET PDSETUP TO <driver_name> command in FoxPro for Windows, the current resource file (by default FOXUSER.DBF and its associated memo file, FOXUSER.FPT) must already have an MS-DOS style printer driver loaded. This MS-DOS style printer driver must have been previously created by FoxPro for MS-DOS. FoxPro for Windows normally uses Windows printer drivers for all its printing. Only use the SET PDSETUP TO <driver_name> command with character-based reports that were created in FoxPro for MS-DOS. NOTE: The SET PDSETUP <driver_name> command has no effect on Windows printer drivers.
================ End of PSSQA.TXT ================ |
Additional reference words: FoxWin 2.60a tips Q&A ideas contents
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |