04.08.2013 Views

Chapter 16 Customizing Your Development ... - dFPUG-Portal

Chapter 16 Customizing Your Development ... - dFPUG-Portal

Chapter 16 Customizing Your Development ... - dFPUG-Portal

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

452 The Fundamentals of Visual FoxPro 6.0<br />

If you’ve gone ahead and changed the Help File location and now want to change it back,<br />

you might get a little frustrated trying to figure out where to change it back to. First of all, help<br />

files are no longer stored in the Visual FoxPro home directory; instead, everything is stored in<br />

the MSDN directory. Typically, that’s under the Program Files\Microsoft Visual Studio<br />

directory (although it may vary if you’ve installed MSDN somewhere else). Second, “help”<br />

actually consists of several hundred .CHM (and related) files deep inside the MSDN directory.<br />

Which file is the “main” file? It’s not even a .CHM file—it’s a custom viewer that Microsoft<br />

uses to provide additional functionality, like the menu at the top of the MSDN help window.<br />

The name of the file is MSDNVS6A.COL, and it’s (as of this writing) located with the rest of<br />

the .CHM files—in the subdirectory MSDN98\98VSA\1033.<br />

You might be thinking that you could create a shortcut to the MSDNVS6A.COL file, and<br />

keep VFP pointed to HACKFOX.CHM, but, unfortunately, shortcuts to MSDNVS6A.COL<br />

generate an error.<br />

Startup switches<br />

You can include “command-line switches”—additional characters after the name of the<br />

program in a shortcut’s Properties dialog—to control how Visual FoxPro will load.<br />

Use the –A command-line switch to start FoxPro without reading the current<br />

CONFIG.FPW and Registry switches. This is handy if one of those files (particularly the<br />

Registry!) has become corrupt, and if you can’t load VFP any other way. Example:<br />

C:\Program Files\Microsoft Visual Studio\VFP98\VFP6.EXE -A<br />

Use –R to re-establish the associations that Visual FoxPro has with file extensions in<br />

Explorer and File Manager. This is a lot easier than having to edit each file association<br />

manually:<br />

C:\Program Files\Microsoft Visual Studio\VFP98\VFP6.EXE -R<br />

Use the –C switch to control which config file VFP will use during startup:<br />

C:\Program Files\Microsoft Visual Studio\VFP98\VFP6.EXE –CF:\MYCONFIG.FPW<br />

If you find yourself using any of these switches frequently, you might consider creating<br />

multiple VFP startup icons on the desktop, each with its own VFP configuration and startup<br />

switches.<br />

Developer vs. user requirements<br />

<strong>Your</strong> needs as a developer and the needs of your users while they are using your application are<br />

considerably different. You’ll often find yourself needing to perform functions for testing and<br />

debugging—while your application is running—that you don’t want your users to have access<br />

to. For this reason, it’s a good idea to have a separate menu pad in your application that<br />

provides access to a variety of “developer-only” commands.<br />

These developer-only commands might include those shown in Figure <strong>16</strong>.4.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!