====================================== FoxPro Developers Network of San Diego ====================================== FoxDev TipsLetter #04-03 April 4, 2004 Website: Editor: ---------------------------------------------------------------------- CONTENTS: * Calendar * From the Editor * Tech Tips: VFP Forum on Tek-Tips.com Pinging Specific Internet Ports More on Shell Execute Tablet PC Applications * Other Stuff: Southwest Fox Conference Dan Covill Please Sir May I Have a Linker? VS Data Team Blog Ken Levy MS Licensing in Trouble? Extreme Programming Refactored * Knowledge Base Updates New/Updated KB articles on VFP * Links: Where Can I Find...? * Administrivia ====================================================================== CALENDAR: All meetings are at Sizzler unless specified otherwise. Thu April 8 - Nick Nikula -------------------------- Create Customizable Applications Using COM+ Events in Visual FoxPro When we talk about events, we usually think of Click(), Activate(), and Destroy events ... We can create our own events. Nick will show you to take advantage of the COM features in Visual FoxPro by implementing interfaces and event binding. Earlier versions of Visual FoxPro provided early binding support for COM servers, but provided late binding support only as a client. Visual FoxPro now contains support for early binding clients. Thu - May 13 - Drew Speedie Thu - June 10 - Barbara Peisch ------------------------------ Short Presentation - OPEN Topic: A reporting class Barbara will be showing us a class and accompanying form she created which allows her to send reports to the native VFP report engine, the Minds Eye Report Engine, or XFRX, all by changing a single property. Thu - July 15 - Mike Stewart Thu - Sept 16 - Barbara Peisch ------------------------------ Short Presentation - OPEN Topic: Client Relationships 101 Regardless of how much programming experience you have, going independent is a whole new world. The first step is creating a standard contract (usually called a "Consulting Agreement") that's fair to both you and your future clients. This session will cover essential elements of a good contract, plus some negotiation strategies. We'll also cover the pros and cons of charging by time and materials versus fixed price, as well as what makes a good design specification. Finally, we'll get into how to establish and maintain a good working relationship, as well as when and how to terminate a relationship that's gone sour. All meetings start at 6:30 pm. 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 PLEASE TRY TO COME EARLY ENOUGH TO ORDER YOUR DINNER BEFORE 6:30! We'll have our Q&A session while we eat. ====================================================================== FROM THE EDITOR: The most important news this month is the Southwest Fox Conference. Read the writeup in the "Other Stuff" section of this newsletter, look at the website, and contact John Overland to join our group registration. Do it before April 30, when the price goes up! I got my "Build Your Own Framework" book from Hentzenwerke. I'm not about to do that (haven't lost my mind entirely!), but there's a lot of good stuff in there about making design decisions. Worth reading whether you build a framework or not. Our "Links" section is getting a bit long in the tooth - I just deleted the references to the VS6 installer. Anyone want to help me review and update that list? Dan Covill ====================================================================== TECH TIPS ====================================================================== VFP FORUM ON TEK-TIPS.COM [This e-mail was forwarded thru the ProFox forum. DC] You are getting this mail because you are a member at the http://www.tek-tips.com VFP (Visual FoxPro) forum. We have expanded the VFP forums. 19,000 members and increasing volumes drove this decision. Similar splits were made in the past to the VB, Access and Crystal Reports forums and they have done well. Your existing VFP forum was renamed to: Microsoft: VFP - General Coding Issues Forum184 http://www.tek-tips.com/gthreadminder.cfm/lev2/4/lev3/27/pid/184 The new VFP forums are: Microsoft: VFP - Automation, Mail & 3rd Party Svcs Forum1251 http://www.tek-tips.com/gthreadminder.cfm/lev2/4/lev3/27/pid/1251 Microsoft: VFP - Databases, SQL, and Reports Forum1252 http://www.tek-tips.com/gthreadminder.cfm/lev2/4/lev3/27/pid/1252 Microsoft: VFP - Web Related Issues Forum1253 http://www.tek-tips.com/gthreadminder.cfm/lev2/4/lev3/27/pid/1253 Microsoft: VFP - Forms, Classes and Controls Forum1254 http://www.tek-tips.com/gthreadminder.cfm/lev2/4/lev3/27/pid/1254 Dave Murphy, CEO Tek-Tips Forums http://www.tek-tips.com ---------------------------------------------------------------------- PINGING SPECIFIC INTERNET PORTS from ProFox Q: Is it possible to ping a server on a particular port? The reason I ask is that I have a mail server that I have had a problem with outgoing mail for some time now. I got a chance to work on this tonight and found that I can send/receive from other computers, it is just my home office that is the problem. I think my ISP is blocking a port or somehow blocking outgoing mail. I believe SMTP uses port 25, and I would like to try pinging my Internet server over this port to see if indeed the port is getting blocked and to see if there is some other port that I can use if it is. A: If you wish to sees the ports used on the current computer, you can do NETSTAT -a More: Look at this list http://www.iana.org/assignments/port-numbers to see what comman internet port are used for what type of application. Most of the ports under 100 are almost reserved,- for existing aplications like telnet, ftp, pop3, whois and so on. FWIW, everyone has a 'services' file on their PC. In Win2k it should be under windows/system32/drivers/etc/. In *nix, it's /etc/ ---------------------------------------------------------------------- MORE ON SHELLEXECUTE from ProFox ShellExecute can be used to print a PDF file (see TIPS 04-01), or to print a Word document. Here's a generalization of that. "Rather than depending on a particular word processor installed, you could just invoke the ShellExec function, passing the "Print" action, and let Windows figure it out for them. That way, folks like me with OpenOffice.org, can use your application, too." liReturn = ShellExe("mydoc.doc","c:\temp","Print") There are several versions of ShellExe around, here's one Ken Levy posted back in 1997: * ShellExe.prg * WinApi :: ShellExecute ** Function: Opens a file in the application that it's ** associated with. ** Pass: lcFileName - Name of the file to open ** ** Return: 2 - Bad Association (e.g., invalid URL) ** 31 - No application association ** 29 - Failure to load application ** 30 - Application is busy ** ** Values over 32 indicate success ** and return an instance handle for ** the application started (the browser) LPARAMETERS tcFileName,tcWorkDir,tcOperation,tcParams LOCAL lcFileName,lcWorkDir,lcOperation,lcParams IF EMPTY(tcFileName) RETURN -1 ENDIF lcFileName=ALLTRIM(tcFileName) lcWorkDir=IIF(TYPE("tcWorkDir")="C",ALLTRIM(tcWorkDir),"") lcOperation=IIF(TYPE("tcOperation")="C" AND ; NOT EMPTY(tcOperation),ALLTRIM(tcOperation),"Open") lcParams=IIF(TYPE("tcParams")="C" AND ; NOT eMPTY(tcParams),ALLTRIM(tcParams),"") *-* HINSTANCE ShellExecute(hwnd, lpszOp, lpszFile, lpszParams, lpszDir, wShowCmd) *-* *-* HWND hwnd; /* handle of parent window */ *-* LPCTSTR lpszOp; /* address of string for operation to perform */ *-* LPCTSTR lpszFile; /* address of string for filename */ *-* LPTSTR lpszParams; /* address of string for executable-file parameters */ *-* LPCTSTR lpszDir; /* address of string for default directory */ *-* INT wShowCmd; /* whether file is shown when opened */ DECLARE INTEGER ShellExecute ; IN SHELL32.DLL ; INTEGER nWinHandle,; STRING cOperation,; STRING cFileName,; STRING cParameters,; STRING cDirectory,; INTEGER nShowWindow RETURN ShellExecute(0,lcOperation,lcFileName,lcParams,lcWorkDir,1) ---------------------------------------------------------------------- TABLET PC APPLICATIONS Mike Stewart of the Visual FoxPro Team has written a white paper on "Creating Tablet PC Applications with Visual FoxPro". Learn how to use the Tablet PC Platform SDK to capture digital ink, recognize handwriting in Visual FoxPro applications, handle events raised by Tablet PC controls, and persist ink to files. [* watch out - this URL wraps! *] ====================================================================== OTHER STUFF ====================================================================== SOUTHWEST FOX CONFERENCE There won't be a Whilfest this year in Milwaukee , Whil's out of the FoxPro business. What to do? Fear not! El Zorro, the Phoenix user's group, has stepped up to the plate and is holding a Southwest Fox Conference in Phoenix on Oct 22-24. Jeff Johnson is the chair, and all the details are on Like Whilfest (and unlike DevCon!) the registration is reasonable, $325 up til April 30. In addition there's a group registration discount, which John Overland is organizing for our chapter. Contact John at jovrlnd@hotmail.com before you register, so he can include you and you get the discount. No reason not to go! Dan Covill ---------------------------------------------------------------------- PLEASE SIR MAY I HAVE A LINKER? I went to download a small app the other day and discovered it needed the .NET runtime, which is a fair-sized download and, I hear, runs very slowly. So I skipped both .NET and the app I wanted. I have no intention of downloading and installing a huge and complex background service just so I can do some pretty XML formatting. I don't think many other folks are, either. Joel Spolsky, of Joel on Software fame, has addressed the .NET download in a letter to Microsoft. His discussion of the run-time problem will resonate with any VFP consultant. "Runtimes are a problem, much like DLLs, because you can get into trouble when application version 1 was designed to work with runtime version 1, and then runtime version 2 comes out, and suddenly application version 1 doesn't work right for some unpredictable reason." .... "All told, for each computer I needed to run this little .NET application on, I had to download something like 70 or 80 MB (good thing we have a fast net connection) and reboot three or four times. And this is at a software company!" .... "So Microsoft, wake up, get us some nice 1950s-era linker technology, and let me make a single EXE that runs on any computer with Win 98 or later and no other external dependencies. Otherwise .NET is fatally flawed for consumer, downloaded software." [These are excerpts. Read the whole thing! ] Dan Covill ---------------------------------------------------------------------- VS DATA TEAM BLOG by Ken Levy If you haven't seen it yet, check out the new blog for the VS Data team which includes members of the VFP team posting news items, info, etc. http://blogs.msdn.com/vsdata/ ---------------------------------------------------------------------- MS LICENSING IN TROUBLE? Slashdot ran an interesting article on MS licensing: http://www.nwfusion.com/news/2004/0308licensing.html "According to NetworkWorld, many licencees are discovering that due to slipping release dates, many thousands of dollars spent on these contracts have brought them zero return." ---------------------------------------------------------------------- EXTREME PROGRAMMING REFACTORED "Extreme Programming Refactored: The Case Against XP", by Matt Stephens and Doug Rosenberg, Apress, 2003. There's a review posted 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" 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.gatwicksoftware.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.foxite.com (registration required) A group of Dutch developers - refreshingly geeky. (Don't be put off by the registration - they're not selling anything.) 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@san.rr.com Board of Directors: Eric Lendvai - President 760-734-4929 eric@elsoftware.com Art Bergquist - Vice Pres 760-740-0428 abergquist@sbcglobal.net Thad V'Soske - Secretary 619-544-9900 tvsoske@yahoo.com Barbara Peisch - Treasurer 760-729-9607 barbara@peisch.com Dan Covill - Director 858-272-2448 dcovill@san.rr.com Claude Nikula - Director 619-615-6318 crndev@verizon.net ----------------------------------------------------------------------