====================================== FoxPro Developers Network of San Diego ====================================== FoxDev TipsLetter #98-1 DECEMBER, 1998 Website: ---------------------------------------------------------------------- CONTENTS: * What Is This, Anyway? * Calendar * Technical: * Stopping AutoLogon Barbara Peisch * Default and NoDefault Barbara Peisch * How to Make a Help File? Dan Covill * Other Stuff: * What Documentation? Dan Covill * Running Visual Basic Mr. Bunny * Administrivia ====================================================================== What Is This, Anyway? This is a first hack at an electronic newsletter for the San Diego FPDN. We used to have a printed one, but efforts to revive it haven't worked very well. I offered to take a shot at an e-mail version, and Barbara Peisch was able to overcome practically no opposition from the board. The board wants this to be a membership benefit, so the e-mail list will include members ONLY. However, feel free to forward it (all of it, please) to anybody you think it might influce to join us. Please (PLEASE) send me anything you think might be helpful for our members to know. That includes tips, gripes, questions, and references. My goal is to continue and expand upon the Q&A session at the meetings. I'll try to get the ball rolling by throwing in some things I can think of. Reply, refute, add to, and change the subject as you see fit. I reserve the right to edit as necessary. Send tips or attachments (in most any form) to me at: Dan Covill (COVILL Consulting, 492-9552) ====================================================================== CALENDAR: December 2 Drew Speedie - Poway, 6 PM December 9 Members' Holiday Dinner - Trophy's ---------------------------------------------------------------------- STOPPING AUTOLOGON Barbara Peisch (This tip came to me courtesy of Tom Piper.) I was having a problem after installing Visual Studio 6. Every time I booted my computer, something (I assume the on-line registration process--there were no messages about what it was trying to do) fired up my Internet connection and it just sat there on the dialog that says "Verifying user name and password". Here's Tom's response: Disable Autologon before running Visual Studio 6.0 Setup. The setup may fail on Windows 95 computers configured with Autologon. Before you install Visual Studio 6.0 or any of its products on a Windows 95 computer with Autologon enabled, turn off Autologon by following the instructions found at (Note: This article contains several additional steps that may not be relevant on your system.) If you installed Visual Studio products on a Windows 95 computer configured with Autologon, and setup failed, repeat your setup steps with Autologon disabled. If remote connections are enabled in Windows 95 or Windows 98, the system may try to initiate an Internet connection at Windows startup or at the start of many applications. This behavior is sometimes called "autodial" or "autoconnect." You can turn off this behavior by setting the registry key EnableRemoteConnect to "N." To do this, create a text file "DisableAutoConnect.reg" with exactly the following three lines: REGEDIT4 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\OLE] "EnableRemoteConnect"="N" Changing this setting to disable remote connections should not prevent any of your normal Internet activities, and this setting is the default for most systems. However, enabling remote connections is necessary for some features of DCOM (see . If there are instances when you need to have remote connections enabled, create a second REG file, "EnableRemoteConnect.reg", with exactly the following 3 lines: REGEDIT4 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\OLE] "EnableRemoteConnect"="Y" Run "EnableAutoConnect.reg" to make the setting, and then run "DisableAutoConnect.reg" to disable it when autoconnect is no longer needed. ---------------------------------------------------------------------- NODEFAULT and DODEFAULT are NOT Opposites Barbara Peisch If you found a method that had these two lines right after each other, you might think it does nothing: NODEFAULT DODEFAULT() Actually, these statements don't really cancel each other out. The NODEFAULT instructs VFP not to perform the built-in behavior, while DODEFAULT() tells VFP to run the code in the parent class. But the built-in behavior may include more than just running the code. Let's look at an example to clarify this. Let's say you've created a textbox class with the following code in the Keypress method: LPARAMETERS nKeyCode, nShiftAltCtrl if nKeyCode = 13 && user pressed Enter * I want to do special stuff when they press Enter endif Now, let's say you create an instance of this textbox that's meant as a place for the user to enter a password. Chances are, you don't want the characters they type to appear on the screen. In the Keypress method for this instance, you put the following: LPARAMETERS nKeyCode, nShiftAltCtrl NODEFAULT DODEFAULT() (Put some code here to display "*" instead of what they typed) In the above code, the NODEFAULT says you don't want VFP to display the character that was typed. The DODEFAULT() says you do want to run the special code in the parent that does something when the user presses Enter. As you can see, there are times when having both these commands is useful. Unfortunately, the syntax Microsoft selected for these two commands makes their true functionality confusing. ---------------------------------------------------------------------- How to Make a Help File? I started looking into generating VFP Help Files. Discovered that (a) the new HTML help requires the user to have Internet Explorer, (b) the older (last year's mandatory technology) Windows Help is no longer supplied (but I have one in my VFP 5), and (c) the process is hopelessly complex and (surprise!) poorly documented. Found a Website devoted to Windows Help authoring tools. There are lots. Some are Shareware, and some cost $400 or more. Some use a word processor, some don't. Boy, is it confusing. Do any of you have experience making Windows Help files for your Vfp apps? What tools did you use? How did you make out? HELP! E-mail me and I'll print the answers here. Dan Covill ---------------------------------------------------------------------- WHAT DOCUMENTATION? by Dan Covill Four times in the past year I have been asked to analyze or modify systems written by other "professionals". Each of the four was written in a different language, each had a different purpose, a different design, and a different appearance. They had one thing glaringly, brazenly, disgustingly in common - there was no documentation. None, nada, zilch, zip. No user manual, no database layouts, no design specs, no modification log. In one case there were a few comments in the code, in the others not even that. This is discouraging. I was prepared for crappy documentation, poorly written, ugly, and out of date. But I wasn't prepared for NOTHING, and four times in a row! I do believe (in a triumph of faith over evidence) that many of us do deliver documentation. I even dare to hope that some of it may rise to a level we could call mediocre. But I'd sure like to see some with my own eyes - I haven't yet. How can we present ourselves as professionals, and have the nerve to ask people to pay us for building them a system, if we don't leave any trail of what we did? These systems weren't built for amusement, hard money was spent to meet an essential business need. Once in production, the owners will be in serious trouble if they can't update or modify their systems as business needs change. The main purpose of documentation is to aid in making repairs or extensions - so that a new contractor can get to work without taking two weeks to find out where things are. That's why buildings have blueprints, so the repair/remodel contractors can find out where the pipes and wires are without digging up the whole place. When we deliver a system without documentation, we're saving the client a few bucks right now and setting him up for a big hit somewhere in the future. It ain't a friendly thing to do, and it ain't professional. Unfortunately, our "industry" (I use the term loosely) has no defined standards for documentation, so each of us has to figure out what is needed and (more difficult) justify the expenditure to the client. But if we can't or won't do that, we're simply not fulfilling our responsibilty. The client hired us to give him what he needs - well, he needs documentation, so let's give him some. Depending on the project, it can be simple or elaborate, but it needs to be there. Being a professional isn't about "being your own boss". It's about holding YOURSELF to a standard of performance when your client doesn't have the knowledge and expertise to do so. It's about doing what's needed, even when it's not wanted. And it carries the obligation to deliver ONLY systems that incorporate sound practice and reasonable workmanship. With documentation. (Dan Covill is the principal in COVILL Consulting and the world's oldest living Foxpro programmer.) ---------------------------------------------------------------------- RUNNING VISUAL BASIC To run Visual Basic, you must first figure out where it is. Select the "Find Files or Folders" from your Start menu. When the dialog appears, enter *.* in the field named Named. Now click Find Now. The Find command will present you with a list of all your files. Search through these files until you see something that looks like Visual Basic, then double-click it. Alternatively, you may double-click on everything until Visual Basic appears to be running. If the Find command is unable to display all your files, then you should narrow the search by deleting files from your hard drive until the entire list can be displayed. From "Mr. Bunny's Guide to ActiveX", by Carleton Egremont III (available at San Diego Technical Books) --------------------------Administrivia------------------------------- This newsletter is a service to members of the FoxPro Developers Network of San Diego (FPDN). The editor (Dan Covill) is solely responsible for the content, Barbara Peisch is to blame for the distribution. Editor: ----------------------------------------------------------------------