====================================== FoxPro Developers Network of San Diego ====================================== FoxDev TipsLetter #02-09 25 September, 2002 Website: Editor: ---------------------------------------------------------------------- CONTENTS: * Calendar * Editor's Note * Tech Tips: VFP8 Beta - For a Select Few Customize the Preview Window Charlie BackSlashes in Listbox Items Barbara Peisch * Other Stuff: Latest IE Security Problem Woody's Watch Paperwork in Oz Quotes from EWD Bah, Humbug! (A Rant) Dan Covill * Knowledge Base Updates New/Updated KB articles on VFP * Links: Where Can I Find...? * Administrivia ====================================================================== CALENDAR: *** New Location: Sizzler in Murphy Canyon *** Thu - Oct 3 - Barbara Peisch - Sizzler in Murphy Canyon ---------------------------- Ever get error messages like "Cannot access the selected table", "Feature not available" or "'field' phrase is not found"? How about those pesky "C0000005" errors? Do these errors leave you wondering what the problem really is? This presentation will cover these and many other common error messages. You'll learn what these errors really mean, and how to solve the problem. Thu - Nov 7 - Nick Nikula - Sizzler in Murphy Canyon ------------------------- Advanced Intellisense IntelliSense is a wonderful addition to VFP development environment. It helps you avoid spelling mistakes, boost your productivity and reduces documentation. You can create self documenting Com Objects and create your very own custom IntelliSense. Nick will show you how the Project- Hook can take over where the IntelliSense stops. January 8 - John Gunvaldson - Bergelectric Escondido --------------------------- John will be showing us how to use the ProMatrix framework. John started using ProMatrix DOS/WINDOWS version back in 1994 for NavSea HQ in Washington DC. He's been on just about every Beta of ProMatrix since then (all through the conversions to VFP 3, 5, 6 and 7). All meetings start at 6:30 pm. Sizzler Meetings: Back room of Murphy Canyon Sizzler: 3755 Murphy Canyon Rd Take I-15 to the Aero Dr exit (South of Balboa) Head west to first light west of freeway Turn right Sizzler is on the right almost immediately Buy your dinner at Sizzler and we'll have our Q&A session while we eat. PLEASE TRY TO COME EARLY ENOUGH TO ORDER YOUR DINNER BEFORE 6:30! Escondido Meetings: Training room of Bergelectric 2222 Meyers Rd. - Take highway 78 to Nordahl (Just west of I-15) - Go south past Mission - Turn right on Meyers (first right past Mission) - The building is on the right just before Oper Street. ====================================================================== EDITOR'S NOTE There was no August issue (I was away). And I guess this is really an October issue, but I'm going to call it September anyway because I don't want to admit that I sloughed off nearly two whole months without collecting all this stuff I've got and ...... There are 87 Knowledge Base updates this time (!!), so I have moved them to the back, just in front of the links. I could just leave them out, but if MS went to the trouble of generating them I think we can spend a minute to look at the list. There's a lot of info in there! Dan Covill ====================================================================== TECH TIPS ====================================================================== VFP8 BETA - FOR A SELECT FEW From the Universal Thread: "The VFP8 beta is only planned to be given out at DevCon, not at any other event after that. After DevCon the VFP team will be very focused on working to complete and ship VFP 8.0 as soon as possible. We actually did have an alpha cycle with people working and testing VFP 8.0 well before the VFP 8.0 beta. What I mean is, the focus after DevCon will be to complete the beta and ship VFP 8.0 rather than extend the beta since it won't be needed. This is the plan, it won't change, shipping is a feature." Ken Levy [Translated from Levy-speak: If you want an advance copy of VFP8 go to DevCon. And release will be fairly soon, perhaps early next year. DC] ---------------------------------------------------------------------- HOW TO: CUSTOMIZE THE REPORT PREVIEW WINDOW by Charlie Coleman Q: How can I specify the size of the report preview window? A; First, in your startup code (initialization of the program) do: PUBLIC oSHOWWIN DO FORM SHOWWIN NAME oSHOWWIN LINKED NOSHOW The form 'showwin' is just a simple VFP baseclass form. Nothing on it. Doesn't really need anything. Then, later whenever you want to do your preview do: oSHOWWIN.Show() oSHOWWIN.WindowState = 2 && maximize preview window REPORT FORM myReport PREVIEW WINDOW SHOWWIN NOCONSOLE oSHOWWIN.Hide() Note the 2nd line above. In this case I maximized the preview window. But you could instead set the top, left, height, width, etc instead. That way, you've pretty much got control over wherever the preview goes. Also note that I hide the window after the report form is run. I think you need to do that since when the report form is closed, the SHOWWIN window may still be visible (the blank form). Note also that if you could add methods, properties, etc to the SHOWWIN form. And in it's Activate code (or wherever) you could make things happen automatically. -Charlie [from ProFox] ---------------------------------------------------------------------- BACKSLASHES IN LISTBOX ITEMS by Barbara Peisch Here's a tip that was recently exposed on one of the VFP newsgroups: Question: Most of you are familiar with how backslashes ("\") work in lists and combos. A single backslash will disable an item, and two backslashes are needed to display a single one. For example, I might want to show a UNC path in my listbox: MyForm.List1.AddItem("\\\\MyServer\\MyMachine\MyFolder") The question is how can one add this item to a listbox and have it appear disabled? Answer: This.AddItem("\]\\\\MyServer\\MyMachine\MyFolder") This undocumented feature has been in the product for years. One important difference to note: With "\", you can still highlight a disabled item in the list by using the arrow keys to get to it. With "\]", you cannot use the keyboard to highlight the item. -BP www.peisch.com ====================================================================== OTHER STUFF ====================================================================== THE LATEST IE SECURITY PROBLEM Woody's Watch "Want to see something scary? Create a file called c:\jelmer.txt and type a few lines of text in it. Then hit Jelmer Kuperus's site at http://www.xs4all.nl/~jkuperus/msieread.htm. [What happens is that Mr. Kuperus's site will display, in your browser, the complete contents of the file! It can do that for any file it knows the name of. DC] Guess what? Internet Explorer - whether it's had the latest "critical updates" applied to it or not - can read the contents of arbitrary files on your PC. I keep mentioning these gaping security holes in WOW because holes in IE can generally be exploited in email, sometimes with a little tweak or two, thanks to Outlook's reliance on the IE rendering engine." [From the latest Woody's Windows Watch ] ---------------------------------------------------------------------- PAPERWORK IN OZ "Although I can accept talking scarecrows, lions and great wizards in emerald cities, I find it hard to believe there is no paperwork involved when your house lands on a witch." --Dave James ---------------------------------------------------------------------- QUOTES FROM EWD Edsger W. Dijkstra, Professor Emeritus of Computer Sciences at The University of Texas at Austin, died at his home the Netherlands on August 6. He was a prolific and pungent writer on the practice of programming. His archived writings are available at: http://www.cs.utexas.edu/users/EWD/ Here are a few quotes from a paper written in 1975: "It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration." "Simplicity is prerequisite for reliability." "Many companies that have made themselves dependent on IBM-equipment (and in doing so have sold their soul to the devil) will collapse under the sheer weight of the unmastered complexity of their data processing systems." ---------------------------------------------------------------------- BAH, HUMBUG by Dan Covill [The following twaddle appeared in a book review in the ACM's Ubiquity on-line magazine. I couldn't let it pass. DC] The Company of the Future: How the Communications Revolution is Changing Management by Frances Cairncross (Harvard Business School Press, 2002) ------------------------------------- Chapter Two: Knowledge, Decision-Making and Innovation "The value of a business increasingly lies not in factories or fleets of trucks, the sort of assets that appear on the balance sheet and are easy to value and manage. It lies in intangibles: brands, patents, franchises, software, research programmes, ideas, expertise. "Knowledge" assets such as these account for perhaps six out of every seven dollars of corporate market value. Managing any of these assets is difficult, but the hardest ones to deal with are those that employees carry around in their heads." --------------------------------------- Bah, humbug! The underlying, basic value of a business lies in the service it provides to others and to society. The factories and truck fleets are the direct means of providing that service. Without a functioning basic service, the "intangibles" are just fluff, and have no value at all. Patents, research, and ideas can provide an advantage, but only to the extent that they increase the effectiveness of your basic service. Knowledge is valuable only to the extent that you can use it; by making your factories more efficient or by operating your fleet of trucks more effectively. The reason that the intangibles SEEM more important is that they're newer. They're not really harder to manage, we just haven't been involved with them as long. We take the factories and trucks for granted (at our peril!) because we already know how to deal with them. A company that extends its management attention to the intangibles may well improve its position, but if it does so by taking its "factories or fleets of trucks" for granted it will be making a big mistake. Dan Covill ====================================================================== VFP KNOWLEDGE BASE UPDATES ====================================================================== The following KB articles are new or updated, per KBAlertz.com Received from 07/23 thru 08/30: (87 entries!) Q250300 PRB: FoxPro DIR Command Returns Incorrect Year for Years > 1999 Q318264 FIX: DO FORM Command in an .exe Holds Form Until Process Ends Q318977 FIX: The CDATA Section of CURSORTOXML May Format Characters Incorrectly Q317489 FIX: Exclude Property Is Not Refreshed When File Is Excluded or Included in the User Interface Q311306 HOWTO: Use Visual FoxPro to Download a Web Page from the Internet Q318461 FIX: Grid Events Are Not Called if Grid Contains No Records Q300184 PRB: Error in ADO Recordset with 255 Fields from Visual FoxPro Table Q192976 PRB: VFP 6.0 Application Requires FoxFont In Fonts Directory Q316910 HOWTO: Create an Auto-ID Field in a FoxPro Table by Using ADO and ASP Q315124 SAMPLE: Use the Winsock ActiveX Control with Visual FoxPro Q238553 SAMPLE: VFPSCUT.EXE Creates Desktop Shortcut to a VFP Application Q326544 BUG: Error When You Select an Empty Visual FoxPro Memo Field Using .NET OleDbDataAdapter and Visual FoxPro OLE DB Provider Q143320 INFO: List of Problems Solved by Visual FoxPro 3.0 for Windows Q167675 BUG: Certain Non-US Characters Do Not Display Properly in VFP Q320152 INFO: Resources for InstallShield Express for Visual FoxPro Q318264 FIX: DO FORM Command in an .exe Holds Form Until Process Ends Q318977 FIX: The CDATA Section of CURSORTOXML May Format Characters Incorrectly Q317489 FIX: Exclude Property Is Not Refreshed When File Is Excluded or Included in the User Interface Q311306 HOWTO: Use Visual FoxPro to Download a Web Page from the Internet Q318461 FIX: Grid Events Are Not Called if Grid Contains No Records Q300184 PRB: Error in ADO Recordset with 255 Fields from Visual FoxPro Table Q192976 PRB: VFP 6.0 Application Requires FoxFont In Fonts Directory Q316910 HOWTO: Create an Auto-ID Field in a FoxPro Table by Using ADO and ASP Q315124 SAMPLE: Use the Winsock ActiveX Control with Visual FoxPro Q238553 SAMPLE: VFPSCUT.EXE Creates Desktop Shortcut to a VFP Application Q321631 BUG: Visual FoxPro OLE DB Provider Only Works with CHAR ADODB.Command Parameters Q100554 INFO: Using ADIR() Function to Obtain MS-DOS File Information Q101595 PRB: "Insufficient Memory for Application's Required Space" Q101808 PRB: Insufficient Memory or Not Enough Memory for Application Q108824 Programmatically Copying Text to/from Windows Clipboard Q111507 PRB: Generate Command on Program Menu Is Disabled Q112084 PRB: SET TALK ON Does Not Work with SET STATUS BAR ON Q115482 SET VOLUME Provides Support for MS-DOS-Style Paths Q115943 How to Determine Amount of Available Disk Space on a Mac Q115888 How to Force a Hung Macintosh Application to Quit Q115889 CONFIG.FPM Settings for Behavior Similar to Fox/Windows Q117204 COMMAND+PERIOD Key Combination Works Similarly to ESC Key Q114806 How to Determine the Path to the Macintosh Desktop Q118937 PRB: Files Copied from MS-DOS to Mac Have Wrong Icon and Type Q120366 How to Create a Bootable Floppy Disk for the Macintosh Q120549 How to Start FoxPro from the Apple Menu Q120443 BUG: SET SYSMENU TO _MWINDOW Doesn't Disable Window Menu Q133023 How to List Number of Records in Each Group of a SQL Group By Q138043 PRB: Error Instantiating Object Q136640 How to Fill a Combo Box with a Unique List of Items Q141441 How to Create Validation Rules on Views Q199848 BUG: Fatal Error When Releasing a Converted FoxPro 2.x Form Q200294 BUG: Cannot Use LoadPicture() with Images Included in Project Q214560 FIX: Installing Newer MSDN Causes Help to Malfunction Q215442 PRB: InteractiveChange Event of List Box Does Not Execute After Clicking and Dragging a List Box Item Q216055 HOWTO: Pass an Array by Reference to LCK and Return Changes Q216318 FIX: Slow Performance with Remote Views of SQL Server Tables Containing Text Fields Q216087 PRB: Err "Unable to find Visual Class Library" in Project Q218457 BUG: Custom Expression Builder Crashes Query and View Designers Q220157 PRB: GETPRINTER() Behaves Differently Based on Machine's OS Q221624 FIX: Extra EOF Char Inserted with SELECT Within Transaction Q221709 FIX: Component Gallery Refresh Button for Web View Doesn't Work Q221629 FIX: "Unknown COM status code" With ActiveX Conferencing Control Q221632 FIX: Web Publishing Wizard Gives RunCode Runtime Error Q221719 FIX: Polish Collate Sequence Not Available in Options Data Tab Q221720 FIX: COM Servers Cannot Redimension Arrays Passed By Reference Q221648 FIX: RI Code Not Selecting Right Work Area After Cascaded Delete Q221650 FIX: Error 11 (Function argument invalid) w/ SQL SELECT 'LIKE' Q221727 FIX: FOXUSER Restores Window to Incorrect MDI State Q221728 FIX: C0000005 Fatal Error With MODIFY WINDOW SCREEN in EXE Q221732 FIX: Multiple Opens of Memo File May Cause Corruption Q221671 FIX: OLE Error "Member Not Found" Using MSMQ Q221739 FIX: Error Using Object Property > 255 Characters As Parameter Q221749 FIX: Top Level Forms with Menus Allow Access to Datasession 0 Q221696 FIX: C00000FD Fatal Error Docking Toolbar in Rare Circumstance Q222136 FIX: C0000005 Fatal Error Typing Characters In Find Dialog Box Q232130 BUG: Opening Then Closing 2nd Modal Form Disables VFP Close Box Q232660 BUG: GDI Leak Printing Report with 256 Color BMP and SET PALETTE OFF Q235262 PRB: Installation Errors Installing Visual FoxPro Applications Q237454 HOWTO: Associate File Extensions with a Custom Visual FoxPro Application Q238513 PRB: Opening a ComboBox Prevents Timer Event Code from Executing when Timer.Interval is a Low Value Q238518 PRB: SQL Select Statement Using an Outer Join Clause Adds NULL Values to the Output Q238556 HOWTO: Notify Other Team Members When Changing Source-Controlled Projects Q240227 HOWTO: Capture the Path to the Windows and System Folders Q240239 HOWTO: Capture the Path to a File that has been Loaded into an Applications Memory Space Q240436 FIX: Repeated SQL SELECT Statements Cause "File is in use" Error Q240809 HOWTO: Prevent Switch To or Application Busy Message Using OLE Automation Q241391 HOWTO: Use the Win32 API FormatMessage Function with Visual FoxPro Q240887 BUG: Fatal Error Referencing Memo Field in Watch Window Bound to Edit Box Q242467 FIX: Dividing 0 by 0 Returns Garbage Characters or Incorrect Numeric Value Q242974 PRB: Unable to Create or Modify REMOTE View Using a RIGHT JOIN in the View Designer Q242982 PRB: VFP Hangs on Windows 98 When Using Novell NetWare Client After Exceeding the Number of Available File Handles How To Look Up These Articles: To get to a specific KB article: a. Go to support.microsoft.com. Search is at left of the page. b. Select "Visual FoxPro" on the drop-down. c. Enter the document number in the textbox below it. d. Click on the green arrow. To Subscribe: Subscribe at . You can specify any MS product to receive alerts on. ====================================================================== LINKS ====================================================================== This is a (semi) permanent list of places to look for technical help when you get blind-sided by the latest urgent requirement. We don't give specific URLs for MSDN articles because (a) they're too long and (b) they change too often! ------------------------------- MSDN ON LINE: There's a ton of stuff here, look at the Magazines tab, and read some of the regular columns. MSDN Library Look in Technical Articles | Visual Studio | Visual FoxPro MSDN Library: "Building Three-Tier Client/Server Applications with Visual FoxPro" ADO MSDN Library: ADO Jumpstart for Microsoft Visual FoxPro Developers John V. Petersen, April 1999 DNA (Distributed interNet Architecture): MSDN On-line: "Top Windows DNA Performance Mistakes and How to Prevent Them" FoxPro 2.6: http://members.aol.com/FoxProResources/fpfp.htm MTS: Microsoft Transaction Server MSDN Library: "Microsoft Transaction Server for Visual FoxPro Developers" ODBC: MSDN Library: "Using Visual FoxPro to Access Remote Data" ODBC drivers are part of MDAC - Microsoft Data Access Components - and are available for download at: "www.microsoft.com/data" VS Installer: MSDN Library: a. "Using Visual Studio Installer for VFP 6.0 Applications" b. "VFP 6.0 and VS Installer Tutorial" VFP Publications: www.advisor.com FoxPro Advisor www.pinpub.com FoxTalk magazine www.hentzenwerke.com Hentzen Publishing (Books, discussion, and downloads) VFP General: msdn.microsoft.com/vfoxpro Microsoft's official VFP home page www.foxcentral.net Joint effort by Microsoft, West-Wind, and the Universal Thread Lots of news and development info. MS Developer Applications Forum on Compuserve http://go.compuserve.com/msdevapps The History of FoxPro (submitted by Steve Settimi) www.foxprohistory.org The Universal Thread http://www.universalthread.com The "Wiki" www.wikis.com fox.wikis.com fox.wikis.com/wc.dll?Wiki~FoxForumWiki Here is the most complete set of FoxPro links you're likely to find: http://www.cetus-links.org/oo_visual_foxpro.html Private websites with useful free info and downloads: www.prolib.de/foxlinks.afp (wOOdy Wondzinski) www.honeypass.com (Allen Pollard) www.ukfug.org.uk British user group www.lafox.org LA user group www.pinter.com/ Les Pinter www.vfug.org/ Virtual Fox User Group www.leafe.com Ed Leafe, ProFox listserve www.jamesbooth.com www.foxforum.com www.foxfolk.com www.stevenblack.com www.craigberntson.com WEB Development: These products all work well with VFP. AFP www.afpweb.com and www.afpages.com DotFox www.elsoftware.com FoxWeb www.foxweb.com Web Connection www.west-wind.com X-WORKS www.x-works.com Windows General Win32 API (with VFP examples) XML - What's New in XML for Microsoft Windows 2000 See also OLE DB drivers for XML in MDAC 2.6 at "microsoft.com/data" [Contributions solicited. DC] --------------------------Administrivia------------------------------- This newsletter is a service to all FoxPro developers, provided without charge by the FoxPro Developers Network of San Diego (FPDN). Anyone may subscribe (or unsubscribe) at our web site . The link is on the home page. The Resources button on the website will take you to the back issues of the newsletter. The editor (Dan Covill) is solely responsible for the content. E-mail him with YOUR tips, comments, or complaints. Editor: Dan Covill 858-272-2448 dcovill@acm.org Board of Directors: Eric Lendvai - President 760-734-4929 eric@elsoftware.com Art Bergquist - Vice Pres 760-740-0428 abergquist@sbcglobal.net Claude Nikula - Secretary 619-615-6318 crndev@cox.net Barbara Peisch - Treasurer 760-729-9607 barbara@peisch.com Dan Covill - Director 858-272-2448 dcovill@acm.org Thad V'Soske - Director 619-544-9900 tvsoske@hanoverdirect.com ----------------------------------------------------------------------