====================================== FoxPro Developers Network of San Diego ====================================== FoxDev TipsLetter #01-11 3 November, 2001 Website: Editor: ---------------------------------------------------------------------- CONTENTS: * Calendar ** Wednesday, November 7 * Tech Tips: VFP7 Runtime Files wOOdy Setting Focus to Top Level Forms Steve Sawyer's View Editor FoxPro 2.6 Resources * Links: Where Can I Find...? * Other Stuff: Spanish Language VFP Sites The Help File is Perfect... Anders Altberg Don't Come to France, Bill! J. Maurice * Administrivia ====================================================================== CALENDAR: All meetings are in Escondido, at 6:30 pm. Nov 7 - Tips and Tricks ----------------------- This month we'll have the Tips and Trick meeting we originally scheduled for August. We've got a number of good ones that may surprise you, so don't miss this meeting! (Our annual election is scheduled for this meeting, but since there are no new candidates for office, we'll probably just vote everyone back in by acclamation the way we usually do.) Dec 19 (Wednesday) ------------------ Our annual holiday dinner party will be at Trophy's La Jolla, in the Costa Verde center across Genesee from UTC. We'll meet at 7:00. From I-5: Take the La Jolla Village Dr exit and head east, toward UTC. Turn right on Genesee and right at the first light, into the Costa Verde center. Trophy's will be right up ahead on the right. From 805: Take the Miramar Rd/La Jolla Village Dr exit and head west, past UTC. Turn left on Genesee and right at the first light, into the Costa Verde center. Jan 2 - Web Connection Part 1 ----------------------------- Barbara Peisch will demonstrate the basics of how to create data-driven web sites using West Wind's Web Connection. Feb 6 - Web Connection Part 2 ----------------------------- Barbara Peisch will complete the presentation on Web Connection, focusing mainly on how to deploy a web application created with Web Connection to a live server. ------------------------------- Escondido meetings are at Bergelectric, 2222 Meyers Avenue. Take the Nordahl exit from Highway 78 (west of I-15). Head South. Right on Meyers Ave, first right past Mission. It's a one-story building on the right (there's no sign). ====================================================================== TIPS ====================================================================== VFP7 RUNTIME FILES wOOdy Most of you know that you don't have to "install" (i.e., register) the VFP runtime files if you have them included in the application directory. Are there any changes for VFP7? Juergen Wondzinski (wOOdy of ProFox fame) provided the following: At minimum, you have to deliver: YourApp.exe VFP7R.Dll VFP7rENU.dll (English language) VFP checks the language of the Windows version (or more specific, the language setting of the current user), and tries to load the specific language Resourcefile [see note below on "resource files"]. If this isn't available, it defaults to the English language file: And since VFP7 is compiled in MS C++ 7.0 (oopps: VC.NET), but that runtimes aren't widely available yet, you also have to copy that file: MSVCR70.dll If you need a single install file for the runtimes (including all possible Language Resource Files), then feel free to use this one: For VFP6: ftp://ftp.prolib.de/public/PROLIB/VFP6SP5RT.EXE For VFP7: ftp://ftp.prolib.de/public/PROLIB/VFP7SP0RT.EXE Servus wOOdy www.prolib.de Notes: The VFP7T.dll (T as in multiThreaded) is only needed if you compiled a DLL with the multithreaded Option. If not: No need to install it. Also: Don't mix the C understanding of a "Resource File" with the FoxPro way. In standard Windows programming, a resourcefile is normally a DLL, which includes the resources for visible dialogues like the Label-Captions, Sizes and Positions. In VFP thinking, a Resourcefile is the FoxUser.DBF, which holds information for Window Attributes, calendar entrys and such. When VFP complains about a missing resourcefile at startup, it's always the DLL missing; the Foxuser will get created from scratch, thus don't worry about that one. [There is also a VFP7RUN.exe, which was installed in your Program Files\Common Files\Microsoft Shared\VFP\ directory. This allows you to run APPs as well as EXEs. DC] ---------------------------------------------------------------------- SETTING FOCUS TO TOPLEVEL FORMS from ProFox Q: My app has a top-level form, but when it comes up it isn't active. There isn't a login screen and thisform.setfocus or thisform.somebutton.setfocus did not work. Why? A: ProFox, in the persons of Steven Weeks and Allen Pollard, provided the following code to make the form have focus. declare integer FindWindow in USER32.dll integer, string declare integer SetForegroundWindow in User32.dll Integer WindowTitle=chr(34)+alltrim(thisform.caption)+chr(34) winHandle = FindWindow(0,&WindowTitle) if winHandle > 0 SetForegroundWindow(winHandle) endif Allen Pollard has other stuff on his website at www.honeypass.com You should add that in VFP7 a form has a hWnd property so FindWindow isn't needed to get the handle. (And so does _Screen) Anders Altberg [This is a good example of the breadth of ProFox. Allen Pollard is in the UK, and Anders Altberg is in Sweden. DC] ---------------------------------------------------------------------- STEVE SAWYER'S VIEW EDITOR from Profox Q. Is there a way to hack the view designer, so I can write by hand a SQL statement? I have a .dbc, a connection to a SQL Server and a few remote views. But, as the views become more complicated, it's harder to write them in view designer. A. I use Steve Sawyer's ViewEditor to create all of my views. It is a must have tool. To get it go to http://www.stephensawyer.com/ and click on FTP Area and click on ViewEdit2025.zip. The only "problem" with it is you can only grab the tables from one DBC. I point this out because some people create separate DBC's for customer, orders, parts, etc., or because they are sharing with another system. If you place all of your tables in one DBC and include your views in this DBC or create a separate DBC for your views, you will love this tool. Jacci Adams Lindsay-Adams Consulting jacci@neo.rr.com ---------------------------------------------------------------------- FOXPRO 2.6 RESOURCES from ProFox Q. Anyone know how to determine if a credit card number is valid? I don't need to authorize a charge, just want to make sure the end-user didn't key the sequence of numbers in incorrectly. A. I've got a UDF called CredCard() that does that. It's located on my FoxPro Functions and Procedures page at: http://members.aol.com/FoxProResources/fpfp.htm http://members.aol.com/FoxProResources/fpfp.htm Ralph Morse ---------------------- what a great site for FP2.x users! Lurkers: If you get one of those "Where do I find the patch for FoxPro 2.5 or 2.6" whiners: this is the rescue. All patches available. I added it to my list of useful FoxPro links at www.prolib.de/foxlinks.afp wOOdy ====================================================================== 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 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 General: This is the most complete set of FoxPro links you're likely to find: http://www.cetus-links.org/oo_visual_foxpro.html MSDN Library: "Building Three-Tier Client/Server Applications with Visual FoxPro" Private websites with useful free downloads: www.prolib.de/foxlinks.afp (wOOdy Wondzinski) www.honeypass.com (Allen Pollard) WEB Development: These products all work well with VFP. DotFox www.elsoftware.com WestWind www.west-wind.com FoxWeb www.foxweb.com AFP www.afpweb.com and www.afpages.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] ====================================================================== OTHER STUFF ====================================================================== SPANISH-LANGUAGE VFP SITES from ProFox Este sitio, que est  en espa¤ol se parece tener materia bastante de VFP en ‚l. {This site, which is in spanish seems to have quite a bit of VFP stuff on it.} http://www.fpress.com There's also a very big Brasilian listgroup for VFP with many hundred paricipants. foxbrasil@yahoogroups.com [Posted on ProFox by Bob Lee and Anders Altberg] ---------------------------------------------------------------------- THE HELP FILE IS PERFECT... by Anders Altberg "The Help file is perfect - once you've read it through from beginning to end three or four times." [Sad, but too, too true! DC] ---------------------------------------------------------------------- DON'T COME TO FRANCE, BILL! by Jean Maurice [Posted on ProFox. DC] In fact, I began to write a 'long' answer and when I clicked on "SEND", W98 crashed! For his own safety, I hope Bill Gates never come to France. J. MAURICE @Grenoble.France.Europe --------------------------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 abergquis@cs.com Claude Nikula - Secretary 619-615-6318 crndev@home.com 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 ----------------------------------------------------------------------