<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" 
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
	<channel>
<title>foxpert Knowlbits</title><link>http://www.foxpert.com/index.html</link><description>Hot News&#x21;</description><dc:language>de</dc:language><dc:rights>foxpert (c) 2017 </dc:rights><dc:date>2011-02-08T00:00:00+01:00</dc:date><admin:generatorAgent rdf:resource="http://www.realmacsoftware.com/" />
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
<lastBuildDate>Fri, 19 Jul 2019 15:56:37 +0200</lastBuildDate><item><title>Packing tables with FinalBuilder</title><dc:subject>Knowlbits</dc:subject><dc:date>2011-02-12T00:00:00+01:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_201102_2.html#unique-entry-id-31</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_201102_2.html#unique-entry-id-31</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">We use FinalBuilder to package our bi-monthly updates of our FoxPro DOS pharmacy application. It&rsquo;s a set of multiple FinalBuilder files with hundreds of individual actions. One of the tasks involves creating a clean set of DBF files for specific modules that we ship to our clients when their version got corrupt.</div></span>]]></content:encoded></item><item><title>Significant digits in Visual FoxPro</title><dc:subject>Knowlbits</dc:subject><dc:date>2011-02-08T00:00:00+01:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_201102_1.html#unique-entry-id-32</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_201102_1.html#unique-entry-id-32</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">Steve Bodnar asked an interesting question on Twitter yesterday. Why does he get different results for the following two lines?</div></span>]]></content:encoded></item><item><title>Unit tests </title><dc:subject>Knowlbits</dc:subject><dc:date>2010-12-06T00:00:00+01:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_201012_1.html#unique-entry-id-33</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_201012_1.html#unique-entry-id-33</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text"><br />There are some topics that I've been talking about for years at conferences, user group meetings, in articles, and so forth. One of these topics is code quality. My recent attempt to increase code quality of my fellow developers was the introduction of test-driven development. </div></span>]]></content:encoded></item><item><title>Implementing SmartCopy</title><dc:subject>Knowlbits</dc:subject><dc:date>2009-10-26T00:00:00+01:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200910_2.html#unique-entry-id-50</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200910_2.html#unique-entry-id-50</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">The following program implements sort of a smart copy in Visual FoxPro. When something is selected, the selected<br />text is copied. Otherwise the entire current line. So far, only Ctrl+C is implemented.</div></span>]]></content:encoded></item><item><title>Locking done quickly </title><dc:subject>Knowlbits</dc:subject><dc:date>2009-10-26T00:00:00+01:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200910_1.HTM#unique-entry-id-51</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200910_1.HTM#unique-entry-id-51</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">Joel Leach <a href="http://twitter.com/joel_leach">pointed out on Twitter</a> that the following code accomplishes the same even though Visual FoxPro's documentation states that SET REPROCESS TO 0 SECONDS is an invalid statement:</div></span>]]></content:encoded></item><item><title> Visual FoxPro crashes after installing hot fix or service pack 2 </title><dc:subject>Knowlbits</dc:subject><dc:date>2009-09-15T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200909_1.HTM#unique-entry-id-52</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200909_1.HTM#unique-entry-id-52</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">This is an error report that increasingly comes up lately. Visual FoxPro applications load two files when you run the EXE or instantiate a COM server: VFP9R.DLL and VFP9Rxxx.DLL. The first is the actual runtime library; the second file is a localized resource file. This file contains all localized strings such as menus, error messages, dialogs, names for months and week days, and so forth. There are multiple versions of this file. VFP9RENU.DLL is the English version, VFP9RDEU.DLL the German version, and so on. Which file Visual FoxPro loads depends:</div></span>]]></content:encoded></item><item><title>Installing Windows 7 on VMware Server 2.0.1</title><dc:subject>Knowlbits</dc:subject><dc:date>2009-08-19T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200908_4.HTM#unique-entry-id-53</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200908_4.HTM#unique-entry-id-53</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">VMware Server does not yet support Windows 7, but that doesn't mean you have to wait for a new release. When creating a new virtual machine, pick either Windows Vista 32 bit or Windows Vista 64 bit instead. Downloading the ISO file from MSDN Subscriber Download, placing this file in one of the data stores and mounting the image into the virtual CD drive is the easiest way to get the setup running.</div></span>]]></content:encoded></item><item><title>Object reference counters in VFP </title><dc:subject>Knowlbits</dc:subject><dc:date>2009-08-14T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200908_3.HTM#unique-entry-id-54</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200908_3.HTM#unique-entry-id-54</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">Visual FoxPro maintains a reference counter for every object. Whenever a reference to an object is stored in a variable or property, the reference counter is incremented by one. When the same property or variable is filled with a different value, or when it goes of scope, Visual FoxPro decrements the counter by one. Visual FoxPro releases the object once the counter reaches zero.</div></span>]]></content:encoded></item><item><title> VMWare Server installation notes </title><dc:subject>Knowlbits</dc:subject><dc:date>2009-08-06T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200908_2.HTM#unique-entry-id-55</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200908_2.HTM#unique-entry-id-55</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">After using VMWare for various purposes for many, many years now, I've moved my development environment to virtual machines two years ago. These are mostly Windows XP and Windows Vista clients with around 1 GB of RAM. I stored and executed them on my main development laptop. While using the laptop provided various advantages one disadvantage became more and more prevalent: Notebook hard drives simply can't deal very well with multiple requests at the same time.</div></span>]]></content:encoded></item><item><title> Changing the TCP ports for VMWare Server 2 </title><dc:subject>Knowlbits</dc:subject><dc:date>2009-08-06T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200908_1.HTM#unique-entry-id-56</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200908_1.HTM#unique-entry-id-56</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text"><a href="http://www.vmware.com/products/server/">VMWare Server 2</a> has significant changes user interface-wise compared to the first version of the free VMWare Server product. The previous version (which itself is the successor of GSX server) provided access to the server and virtual machines through the VMWare Server Console. The Server Console could be replaced by Virtual Center 1.4, provided you had a license.</div></span>]]></content:encoded></item><item><title> Have a date&#x2c; or two&#x2c; but never half </title><dc:subject>Knowlbits</dc:subject><dc:date>2009-07-14T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200907_2.HTM#unique-entry-id-57</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200907_2.HTM#unique-entry-id-57</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">Date is one of those data types that is very unique to FoxPro, or at least, not that common in other programming languages. Most other languages have some sort of datetime data type that combines a date with the time during that day.</div></span>]]></content:encoded></item><item><title> Fatal error 0x8000FFFF when using a COM server </title><dc:subject>Knowlbits</dc:subject><dc:date>2009-07-07T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200907_1.HTM#unique-entry-id-58</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200907_1.HTM#unique-entry-id-58</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">Our application needs to talk to quite a few other applications. Recently I replaced the existing DDE based interface with a COM based one. The vendor of the other application provides a COM server that controls their application and passes data back and forth. My first attempt in Visual FoxPro looked like this</div></span>]]></content:encoded></item><item><title>Unit tests to validate COM interfaces </title><dc:subject>Knowlbits</dc:subject><dc:date>2009-06-30T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200906_2.HTM#unique-entry-id-59</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200906_2.HTM#unique-entry-id-59</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">Creating a COM server in VFP is easy, maybe too easy. Check the OLEPUBLIC checkbox or add the OLEPUBLIC keyword to the class definition and you are done. Building a DLL creates a COM server that you can pass to anyone who needs to interface with your application. Using a COM server in VFP is similar uneventful. Instantiate the COM server using the ProgId and call methods on the object, that's it.</div></span>]]></content:encoded></item><item><title>Get rid of security warnings </title><dc:subject>Knowlbits</dc:subject><dc:date>2009-06-30T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200906_1.HTM#unique-entry-id-60</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200906_1.HTM#unique-entry-id-60</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">When you download a file with Internet Explorer, the file is tagged as being downloaded from the internet. This has impact on a number of file types. When the file is an EXE and you execute it, you (or more specifically, your users) get a warning:</div></span>]]></content:encoded></item><item><title>RecordSource - bang.boom.gone </title><dc:subject>Knowlbits</dc:subject><dc:date>2009-05-19T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200905_1.HTM#unique-entry-id-61</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200905_1.HTM#unique-entry-id-61</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">In Visual FoxPro every object belongs to a particular data session. Under normal circumstances this is the data session in which the object is created. The exception are objects that have an intrinsic data session, namely Form, FormSet, Toolbar, and Session. Instantiating these objects may create a new data session in which these objects are then built.</div></span>]]></content:encoded></item><item><title>ON SAVE DAYLIGHT RECOMPILE </title><dc:subject>Knowlbits</dc:subject><dc:date>2009-04-02T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200904_1.HTM#unique-entry-id-62</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200904_1.HTM#unique-entry-id-62</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">This year I lost another hour of my life. I suffered the switch to daylight saving time twice: The first time early March in Seattle in the USA, the second time the past weekend in Germany. Windows has come a long way to adjust to these changes automatically, other devices I own aren't as smart, unfortunately. But that's a different story.</div></span>]]></content:encoded></item><item><title> Detecting idle users </title><dc:subject>Knowlbits</dc:subject><dc:date>2009-03-13T00:00:00+01:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200903_1.HTM#unique-entry-id-63</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200903_1.HTM#unique-entry-id-63</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text"><info><b>Updated 2009-04Apr-10</b></info>It's not too uncommon in business application development to face the requirement to log out users automatically after a period of time. Preventing access to the application by unauthorized users is frequently quoted as a reason for such a feature. This purpose, however, should better be handled on the corporate level. A policy that locks a computer after a certain period of time is more secure, more reliable and better way to prevent access.</div></span>]]></content:encoded></item><item><title> How empty is an empty RecordSource? </title><dc:subject>Knowlbits</dc:subject><dc:date>2008-08-25T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200808_1.HTM#unique-entry-id-64</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200808_1.HTM#unique-entry-id-64</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">Can a record source be empty? Is empty the same as empty? Are all empty record sources equal, or are some more equal than others? Does a grid suffer it doesn't have a record source? Questions over questions...</div></span>]]></content:encoded></item><item><title>Events happen</title><dc:subject>Knowlbits</dc:subject><dc:date>2008-07-16T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200807_2.HTM#unique-entry-id-65</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200807_2.HTM#unique-entry-id-65</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">I think it was Jim Booth who used to say this in his sessions. It's a valuable lesson one shouldn't forget. Given that frmDialog.SCX is a form with just one label and the following code in the Init:</div></span>]]></content:encoded></item><item><title> Grids&#x2c; images and a crash. </title><dc:subject>Knowlbits</dc:subject><dc:date>2008-07-08T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200807_1.HTM#unique-entry-id-66</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200807_1.HTM#unique-entry-id-66</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">In my session "Crashing VFP and preventing crashes" I show that displaying a corrupted image in a grid crashes Visual FoxPro. There's actually more to that as such a crash isn't limited to invalid images.</div></span>]]></content:encoded></item><item><title> Function argument value&#x2c; type&#x2c; or count is invalid. </title><dc:subject>Knowlbits</dc:subject><dc:date>2008-05-27T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200805_1.HTM#unique-entry-id-67</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200805_1.HTM#unique-entry-id-67</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">Another problem that is hard to locate. You build a COM project, either an EXE or any of the DLL types. After creating the EXE or DLL file, Visual FoxPro suddenly displays the error message "Function argument value, type, or count is invalid" and stops building the project. There is a DLL or EXE in the directory, but it doesn't contain any COM registration information. The TLB and VBR files are also missing.</div></span>]]></content:encoded></item><item><title>REPLACE FOR ErrorIn(REPLACE)</title><dc:subject>Knowlbits</dc:subject><dc:date>2008-04-28T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200804_2.HTM#unique-entry-id-68</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200804_2.HTM#unique-entry-id-68</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">REPLACE is one of those 174 commands in Visual FoxPro that looks easy at first glance. The only easy thing about REPLACE, though, is the easiness of introducing subtle errors in your code. A well known behavior of REPLACE is that a line like</div></span>]]></content:encoded></item><item><title>ActiveX generic fix</title><dc:subject>Knowlbits</dc:subject><dc:date>2008-04-18T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200804_1.HTM#unique-entry-id-69</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200804_1.HTM#unique-entry-id-69</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">After reading <a href="http://www.foxpert.com/knowlbits_200801_1.htm">my article</a> on dealing with non-responding ActiveX controls, Carlos Alloatti came up with a generic fix for the problem:</div></span>]]></content:encoded></item><item><title>Positioning popup menus</title><dc:subject>Knowlbits</dc:subject><dc:date>2008-01-09T00:00:00+01:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200801_2.HTM#unique-entry-id-70</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200801_2.HTM#unique-entry-id-70</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">I'm not a big fan of right click menus. In many applications they are implemented incorrectly and cannot be triggered with the context menu key or the standard Shift+F10 combination. They also seem to be sort of a dump bin for many developers. Instead of thinking how to incorporate a new feature in a useful way, it's just added to all right click menus on the form. Lastly, right click menus are hardly discoverable for the end user. Having to click on every pixel just to discover whether there's some hidden feature is great for games, but not really appropriate for any productive application.</div></span>]]></content:encoded></item><item><title>ActiveFiX</title><dc:subject>Knowlbits</dc:subject><dc:date>2008-01-07T00:00:00+01:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200801_1.HTM#unique-entry-id-71</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200801_1.HTM#unique-entry-id-71</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">ActiveX controls don't work well in VFP with modal forms. Well, that's not exactly a big surprise for anyone who tried that. If you contact the creator of an ActiveX control you usually end up with one of two replies:</div></span>]]></content:encoded></item><item><title>This text is not right</title><dc:subject>Knowlbits</dc:subject><dc:date>2007-12-30T00:00:00+01:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200712_2.HTM#unique-entry-id-72</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200712_2.HTM#unique-entry-id-72</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text"><a href="http://www.hentzenwerke.com/catalog/hackfox7.htm">HackFox</a> mentions this, but it's still annoying. Textboxes cannot be right aligned when using regular text. When you set the Alignment property to 1, you end up with a textbox that looks properly. Yet, as soon as the textbox receives the focus, the content moves to the left.</div></span>]]></content:encoded></item><item><title>HAVING gotcha</title><dc:subject>Knowlbits</dc:subject><dc:date>2007-12-17T00:00:00+01:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200712_1.HTM#unique-entry-id-73</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200712_1.HTM#unique-entry-id-73</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">Without a GROPY BY clause HAVING operates similar to a WHERE clause, except that the filter operates on the result set:</div></span>]]></content:encoded></item><item><title>Vault error when checking in</title><dc:subject>Knowlbits</dc:subject><dc:date>2007-11-28T00:00:00+01:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200711_2.HTM#unique-entry-id-74</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200711_2.HTM#unique-entry-id-74</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">When you check a file into Vault and get the following error message:</div></span>]]></content:encoded></item><item><title>Date range conflicts</title><dc:subject>Knowlbits</dc:subject><dc:date>2007-11-27T00:00:00+01:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200711_1.HTM#unique-entry-id-75</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200711_1.HTM#unique-entry-id-75</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">One common problem in database applications is checking for conflicts in a date or datetime range. For instance, your application might manage appointments which have a start date and duration. We might talk about minutes or days here, the fundamental problem remains the same. When you enter a new appointment you have to make sure that it doesn't conflict with an existing one.</div></span>]]></content:encoded></item><item><title>Accumulating the slow parts</title><dc:subject>Knowlbits</dc:subject><dc:date>2007-10-06T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200710_1.HTM#unique-entry-id-76</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200710_1.HTM#unique-entry-id-76</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">As a developer you need a fast machine and fast access to keep the duration of the typical edit-compile-run cycle at a minumum. Slow machines have direct impact on development times. Having a fast machine has a major drawback though: You don't get a feeling what your application feels like to a real user that doesn't work with local data on a fast machine.</div></span>]]></content:encoded></item><item><title>Passing Unicode strings to API functions</title><dc:subject>Knowlbits</dc:subject><dc:date>2007-09-01T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200709_1.HTM#unique-entry-id-77</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200709_1.HTM#unique-entry-id-77</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">Virtually all older API functions exist in two versions: An ANSI version ending in "A" and a Unicode version ending in "W". If you specify an API function without either of them, Visual FoxPro automatically adds "A" at the end and uses the ANSI version. All of this happens automatically, nothing to spend any thought on.</div></span>]]></content:encoded></item><item><title>The SCAN command</title><dc:subject>Knowlbits</dc:subject><dc:date>2007-08-31T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200708_5.HTM#unique-entry-id-78</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200708_5.HTM#unique-entry-id-78</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">I've seen lots of FoxPro programs that use GO TOP before a SCAN loop and SELECT just before the ENDSCAN and before every LOOP statement. These statements aren't required anymore. Yet, many developers use them as a safety belt. So what does SCAN really do? Here are a number of observations:</div></span>]]></content:encoded></item><item><title>NULL in CDX files </title><dc:subject>Knowlbits</dc:subject><dc:date>2007-08-20T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200708_4.HTM#unique-entry-id-79</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200708_4.HTM#unique-entry-id-79</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">VFP doesn't store NULL in the field itself. Instead it uses a hidden field called _NULLFLAGS. You might wonder (well, I didn't, but you might) how VFP can create an index on a column that contains NULL, if NULL is not stored in the field itself. The answer is actually quite simple. A field that contains NULL is stored as a blank string. To distinguish NULL values from real blank fields, VFP precedes any other value with CHR(0x80). Hence, in Northwind\Customers.CDX the index on city contains "_PARIS" instead of "PARIS".</div></span>]]></content:encoded></item><item><title>Comparing byte arrays in C#</title><dc:subject>Knowlbits</dc:subject><dc:date>2007-08-20T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200708_3.HTM#unique-entry-id-80</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200708_3.HTM#unique-entry-id-80</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">Unless I've been missing something in the past there's no native way in C# to compare byte arrays. Well, you could compare their hashes. But that only tells you if they are different. To make sure they are equal, you need to compare them byte by byte. Hence, using hashes is not only slow, it's also pointless.</div></span>]]></content:encoded></item><item><title>Kill your index with REINDEX</title><dc:subject>Knowlbits</dc:subject><dc:date>2007-08-20T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200708_2.HTM#unique-entry-id-81</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200708_2.HTM#unique-entry-id-81</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">When you read about repairing indexes in FoxPro forums, you frequently get the advice to avoid REINDEX. The most common reasoning is that REINDEX depends on the header which might as well be corrupt. That's true, but like most developers, I haven't seen a corrupt index header in years. The header is only updated when you add a tag. As this requires exclusive access to the table, there's little chance of introducing corruption due to caching, multi-user issues, and the like.</div></span>]]></content:encoded></item><item><title>Detecting CDX changes</title><dc:subject>Knowlbits</dc:subject><dc:date>2007-08-03T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200708_1.HTM#unique-entry-id-82</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200708_1.HTM#unique-entry-id-82</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">When you add a record or modify an indexed field, you expect to find them on any computer that runs your application. The simplest approach would be for Visual FoxPro to read the CDX file every time you search for a record. We can call this the Java compliant mode because when you run your application you would have enough time to get a new cup of coffee.</div></span>]]></content:encoded></item><item><title>Application scope gotcha</title><dc:subject>Knowlbits</dc:subject><dc:date>2007-07-31T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200707_4.HTM#unique-entry-id-83</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200707_4.HTM#unique-entry-id-83</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">Visual FoxPro gives us the flexibility to embed files into the APP/EXE file. Other languages have the ability, but require the developer to use resource functions to access such files. In Visual FoxPro, on the other hand, accessing embedded files happens completely transparently. When you open a file that has the same file name as an embedded one, Visual FoxPro uses the internal one.</div></span>]]></content:encoded></item><item><title>Memo file is missing or invalid</title><dc:subject>Knowlbits</dc:subject><dc:date>2007-07-31T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200707_3.HTM#unique-entry-id-84</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200707_3.HTM#unique-entry-id-84</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">Suddenly you get a "Memo file is missing or invalid" error message when you open a table. You close all open applications, run Visual FoxPro, open the table. and no error. All seems to be well, until a few weeks later you get the error again.</div></span>]]></content:encoded></item><item><title>Looking at Locking</title><dc:subject>Knowlbits</dc:subject><dc:date>2007-07-27T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200707_2.HTM#unique-entry-id-85</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200707_2.HTM#unique-entry-id-85</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">A long time I believed like so many others that Visual FoxPro uses the area beyond 2 GB for locking purposes. wOOdy was the first to point out to me that this isn't the case. He said that this fact further reduces the number of records in a table. So how does locking really work in Visual FoxPro?</div></span>]]></content:encoded></item><item><title>Invalid object name &#x27;dbo.customers&#x27;</title><dc:subject>Knowlbits</dc:subject><dc:date>2007-05-26T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200707_1.HTM#unique-entry-id-86</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200707_1.HTM#unique-entry-id-86</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">Microsoft SQL server assigns character fields a collate sequence that determines how a field is sorted. These collate sequences can be case-sensitive or case-insensitive which makes it possible to write queries without using UPPER() on every single field name.</div></span>]]></content:encoded></item><item><title>Navigation to the webpage was canceled</title><dc:subject>Knowlbits</dc:subject><dc:date>2007-05-18T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200705_6.HTM#unique-entry-id-87</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200705_6.HTM#unique-entry-id-87</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">When you download a CHM file or a ZIP archive containing a CHM file with IE 7, you get an error message when you try to open the help file. The message is "Navigation to the webpage was canceled" or "Dieses Programm kann die Webseite nicht anzeigen." on a German OS. This error message is part of Microsoft's attempt to make Windows more secure. After all, if you don't read the help files, you don't know all the variations of damaging your system.</div></span>]]></content:encoded></item><item><title>Resolution of SECONDS()</title><dc:subject>Knowlbits</dc:subject><dc:date>2007-05-18T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200705_5.HTM#unique-entry-id-88</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200705_5.HTM#unique-entry-id-88</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">On Win 9.x SECONDS() has a resolution of 1 ms. On NT based systems, SECONDS() changes every 10 ms, as you can seewith the following program:</div></span>]]></content:encoded></item><item><title>Secure error handling</title><dc:subject>Knowlbits</dc:subject><dc:date>2007-05-18T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200705_4.HTM#unique-entry-id-89</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200705_4.HTM#unique-entry-id-89</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">Recently I reviewed a Visual FoxPro application for security issues. This application was using a popular file encryption DLL to transparently encrypt all tables. That's actually a good thing because unencrypted DBF files allow hackers to inject code into a VFP application. Breaking encryption algorithms is a futile exercise for all standard encryption algorithms.</div></span>]]></content:encoded></item><item><title>Optimal slow</title><dc:subject>Knowlbits</dc:subject><dc:date>2007-05-16T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200705_3.HTM#unique-entry-id-90</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200705_3.HTM#unique-entry-id-90</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">Optimizing queries in Visual FoxPro is often attributed with increasing speed. Years ago we've seen with the discussion about an index on DELETED() that this is not a universal rule. Optimizing queries can be quite a tricky thing. Here's a situation to think about. You have two tables A and B. The query returns all records from A and about half the records of B:</div></span>]]></content:encoded></item><item><title>SET PATH oddities</title><dc:subject>Knowlbits</dc:subject><dc:date>2007-05-16T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200705_2.HTM#unique-entry-id-91</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200705_2.HTM#unique-entry-id-91</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">Without testing this code in the Command Window, can you say what paths Visual FoxPro searches for each of the following SET PATH statements?</div></span>]]></content:encoded></item><item><title>The current state of Guineu</title><dc:subject>Knowlbits</dc:subject><dc:date>2007-05-04T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200705_1.HTM#unique-entry-id-92</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200705_1.HTM#unique-entry-id-92</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">I've been pretty busy in the past months which kept me from reporting on Guineu's progress. Since November I added the object engine, implemented a number of base classes and started working on the data engine. I also added several functions and commands. The entire feature set is still very basic compared to what Visual FoxPro offers, but it's sufficient to write working applications.</div></span>]]></content:encoded></item><item><title>What&#x27;s the width of a combo list</title><dc:subject>Knowlbits</dc:subject><dc:date>2007-03-30T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200703_3.HTM#unique-entry-id-93</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200703_3.HTM#unique-entry-id-93</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">If you have a combobox for which you don't specify a value for the ColumnWidths property, Visual FoxPro has to figure out itself how wide the dropdown list should be. Basically, Visual FoxPro makes this list just wide enough to fully display its values. However, Visual FoxPro only parses part of the list to determine the actual width of each line. The following code sample demonstrates this behaviour:</div></span>]]></content:encoded></item><item><title>Translating Oracle&#x27;s NVL2 function to Microsoft SQL Server</title><dc:subject>Knowlbits</dc:subject><dc:date>2007-03-29T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200703_2.HTM#unique-entry-id-94</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200703_2.HTM#unique-entry-id-94</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">On <a href="http://www.microsoft.com/technet/interopmigration/sag/unix/oracleunixtosql/or2sql11.mspx">Technet</a> Microsoft states thatthe proper translation for Oracle's NVL2 function:</div></span>]]></content:encoded></item><item><title>Using FileMon</title><dc:subject>Knowlbits</dc:subject><dc:date>2007-03-01T00:00:00+01:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200703_1.HTM#unique-entry-id-95</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200703_1.HTM#unique-entry-id-95</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text"><a href=http://www.microsoft.com/technet/sysinternals/FileAndDisk/Filemon.mspx>FileMon</a> is a great utility if you need to debug performance problems in a Visual FoxPro application. After launching FileMon.EXE as an administrator change the filter to "VFP9.EXE" or the name of your application. When you now run your application, you can see all disk activities in your application.</div></span>]]></content:encoded></item><item><title>Modal forms in hidden screens</title><dc:subject>Knowlbits</dc:subject><dc:date>2007-02-26T00:00:00+01:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200702_7.HTM#unique-entry-id-96</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200702_7.HTM#unique-entry-id-96</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">When you call the Show() method of a form passing 1 as a parameter, you expect the form to show modally. There are some cases, when this is not the case, though. For instance, when the form is already visible, you receive a "Cannot change modality of a visible form" error message. Or, if the form is top-level form it cannot be modal.</div></span>]]></content:encoded></item><item><title>The Two Engines</title><dc:subject>Knowlbits</dc:subject><dc:date>2007-02-26T00:00:00+01:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200702_6.HTM#unique-entry-id-97</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200702_6.HTM#unique-entry-id-97</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">One such difference is what constitutes an expression that can be optimized. The help file states that such expressions have one of the following forms:</div></span>]]></content:encoded></item><item><title>Windows Vista</title><dc:subject>Knowlbits</dc:subject><dc:date>2007-02-21T00:00:00+01:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200702_5.HTM#unique-entry-id-98</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200702_5.HTM#unique-entry-id-98</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">New computers come with Windows Vista preinstalled. Here's my summary of replacing a desktop computer with a new machine:</div></span>]]></content:encoded></item><item><title>SYS(2027)</title><dc:subject>Knowlbits</dc:subject><dc:date>2007-02-20T00:00:00+01:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200702_4.HTM#unique-entry-id-99</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200702_4.HTM#unique-entry-id-99</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">FoxPro has a great history of remaining backward compatible. Yet, sometimes the behaviour changes without that the documentation reflects this. SYS(2027) is still available in VFP 9, although it's not documented anymore. The syntax for SYS(2027) is:<pre>cPathOut = SYS(2027,cPathIn)</pre>Back when Visual FoxPro was really a cross platform development tool, you would use SYS(2027) to convert the internally used DOS path into a platform specific path. On FPM this functions returns a Mac-compatible path, on FPU a SCO Unix compatible path.</div></span>]]></content:encoded></item><item><title>The foxNET series: The language doesn&#x27;t matter?</title><dc:subject>Knowlbits</dc:subject><dc:date>2007-02-11T00:00:00+01:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200702_3.HTM#unique-entry-id-100</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200702_3.HTM#unique-entry-id-100</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">After working in a language like Visual FoxPro for so many years, there are some things that seem so natural that you might not even recognize them as a potential problem. The following code is perfectly useless, but working Visual FoxPro code:</div></span>]]></content:encoded></item><item><title>The foxNET series: protected is protected&#x2c; or is it?</title><dc:subject>Knowlbits</dc:subject><dc:date>2007-02-11T00:00:00+01:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200702_2.HTM#unique-entry-id-101</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200702_2.HTM#unique-entry-id-101</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">As a Visual FoxPro developer you discover many familiarities when you read (or write) .NET code. After all, you have been working in an object oriented environment for over a decade whereas the poor VB guys had to jump right from infancy into adulthood, right?</div></span>]]></content:encoded></item><item><title>The foxNET series: Rounding</title><dc:subject>Knowlbits</dc:subject><dc:date>2007-02-10T00:00:00+01:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200702_1.HTM#unique-entry-id-102</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200702_1.HTM#unique-entry-id-102</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">In the past year I've received an increasing amount of incorrect invoices. I'm not talking about fake invoices, virus attachments or subscription reminders. The invoices I'm talking about were real invoices, except that the amount of VAT was off by one cent, sometimes up, sometimes down. What does this have to do with VFP or .NET?</div></span>]]></content:encoded></item><item><title>Egg or Chicken&#x2c; Properties or Methods?</title><dc:subject>Knowlbits</dc:subject><dc:date>2007-01-25T00:00:00+01:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200701_6.HTM#unique-entry-id-103</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200701_6.HTM#unique-entry-id-103</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">In Visual FoxPro you can use expressions to initialize properties. These expressions are evaluated only once when you first load a class into memory. The result is stored in the class object. To create an expression for a property, you can either enter the equals sign in the Properties Windows followed by the expression or you press the "fx" button next to the text box on the Properties Window.</div></span>]]></content:encoded></item><item><title>TRANSLATE() gotcha </title><dc:subject>Knowlbits</dc:subject><dc:date>2007-01-25T00:00:00+01:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200701_5.HTM#unique-entry-id-104</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200701_5.HTM#unique-entry-id-104</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">TRANSLATE() is the PL/SQL function that provides the same functionality as CHRTRAN() in Visual FoxPro. The function searches the first string and replaces every character in the second one with the corresponding value from the third string:</div></span>]]></content:encoded></item><item><title>Being fooled by Oracle</title><dc:subject>Knowlbits</dc:subject><dc:date>2007-01-25T00:00:00+01:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200701_4.HTM#unique-entry-id-105</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200701_4.HTM#unique-entry-id-105</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">PL/SQL is a programming language that is quite close to Visual FoxPro. Many string functions have the same syntax as in Visual FoxPro, such as SUBSTR() or are pretty close like PADR() that becomes RPAD() in Oracle. However, with concatenation there's a huge difference in Oracle. To combine strings you use the "||" operator instead of "+". That would be fine, if the plus operator wouldn't work with strings, too:</div></span>]]></content:encoded></item><item><title>The scope of CREATEOBJECT</title><dc:subject>Knowlbits</dc:subject><dc:date>2007-01-13T00:00:00+01:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200701_3.HTM#unique-entry-id-106</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200701_3.HTM#unique-entry-id-106</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">Sometimes one gains insights that are absolutely useless. One such piece is the scope of  CREATEOBJECT(). The first time you instantiate an object from a class, Visual FoxPro creates  a template object with all the properties values that the class defines. If the class definition  contains an expression for one of the properties, Visual FoxPro evaluates it at this time once.  For any further instance, Visual FoxPro uses the pre-evaluated expression from the class object.</div></span>]]></content:encoded></item><item><title>Tagged</title><dc:subject>Knowlbits</dc:subject><dc:date>2007-01-12T00:00:00+01:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200701_2.HTM#unique-entry-id-107</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200701_2.HTM#unique-entry-id-107</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">So much for keeping this strictly technical... <a href="http://www.craigberntson.com/blog/2007/01/im-it.asp">  Craig Berntson</a> and <a href="http://www.tedroche.com/blog/?p=2626">Ted Roche</a> tagged me in their blogs.  Which means I'm now participating in a cocktail party game initiated by   <a href="http://pulverblog.pulver.com/archives/006087.html">Jeff Pulver</a> and I don't even know him except  for five things. So, here are the five things about me you didn't (want to) know before:</div></span>]]></content:encoded></item><item><title>Binding to the Valid event</title><dc:subject>Knowlbits</dc:subject><dc:date>2007-01-05T00:00:00+01:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200701_1.HTM#unique-entry-id-108</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200701_1.HTM#unique-entry-id-108</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">As with so many things in Visual FoxPro, binding to the Valid event isn't as straight forward  as one may wish to. When binding to a control in a grid, Visual FoxPro calls the delegate object  only when the grid control contains user defined code in the Valid event at some point in the  class hierarchy. This code doesn't have to do anything and can be a plain comment. Visual FoxPro  needs the user-defined code as a binding place, so its mere existence is sufficient.</div></span>]]></content:encoded></item><item><title>Guineu</title><dc:subject>Knowlbits</dc:subject><dc:date>2006-11-10T00:00:00+01:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200611_1.HTM#unique-entry-id-110</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200611_1.HTM#unique-entry-id-110</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text"><b>Please note:</b> This is an old blog entry and download from an early stage of Guineu. Please see <a href="http://guineu.foxpert.com">http://guineu.foxpert.com</a> for more recent informationabout Guineu and for downloading the current version. Thank you!</div></span>]]></content:encoded></item><item><title>Checking for privileges</title><dc:subject>Knowlbits</dc:subject><dc:date>2006-10-27T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200610_3.HTM#unique-entry-id-112</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200610_3.HTM#unique-entry-id-112</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">Windows maintains two different security related information: permissions and privileges</div></span>]]></content:encoded></item><item><title>Convert ANSI to char in .NET</title><dc:subject>Knowlbits</dc:subject><dc:date>2006-10-24T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200610_2.HTM#unique-entry-id-113</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200610_2.HTM#unique-entry-id-113</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">Sometimes you have a byte array that is an ANSI string. To convert it to a char array or a string in C#, you need to apply a conversion. It appears that many folks are using:</div></span>]]></content:encoded></item><item><title>Maximum number of procedures in PRG files</title><dc:subject>Knowlbits</dc:subject><dc:date>2006-10-23T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200610_1.HTM#unique-entry-id-114</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200610_1.HTM#unique-entry-id-114</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">Visual FoxPro stores procedures and methods of a PRG file in a rather unusalway. Instead of keeping methods with their classes, Visual FoxPro compiles onehuge list of all procedures in a PRG file. Each procedure is assigned a 16-bitID value. For this reason, the total number of procedures that can be stored ina PRG file is 65,535. It doesn't matter how many of them are methods or procedures.It's the total number of PROCEDURE and FUNCTION statements that counts. Here's a code sample that demonstrates this:</div></span>]]></content:encoded></item><item><title>Strange error message with Oracle</title><dc:subject>Knowlbits</dc:subject><dc:date>2006-09-29T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200609_A10.HTM#unique-entry-id-115</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200609_A10.HTM#unique-entry-id-115</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">The Oracle ODBC driver threw an error message on a completely innocent looking line:</div></span>]]></content:encoded></item><item><title>Dealing with Outlook references</title><dc:subject>Knowlbits</dc:subject><dc:date>2006-09-29T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200609_9.HTM#unique-entry-id-116</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200609_9.HTM#unique-entry-id-116</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">When you automate Outlook, you typically create a reference to Outlook.Application and then get the namespace using the GetNamespace() method. Everything you want to do is possible through the Namespace object. loNamespace.Application provides a nice reference back to Outlook. So why would one want to keep the additional reference around?</div></span>]]></content:encoded></item><item><title>Choosing a folder in Outlook</title><dc:subject>Knowlbits</dc:subject><dc:date>2006-09-29T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200609_8.HTM#unique-entry-id-117</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200609_8.HTM#unique-entry-id-117</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">When looking around for samples about Outlook automation samples, it seems that most either create items only in the default folders or hardcode the path in the program code. However, in a real world application, the folder in which you create item often has to be configurable. Fortunately, there's actually a function build into MAPI that does this:</div></span>]]></content:encoded></item><item><title>Opening an e-mail window with GroupWise&#x26;#8482;</title><dc:subject>Knowlbits</dc:subject><dc:date>2006-09-27T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200609_7.HTM#unique-entry-id-118</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200609_7.HTM#unique-entry-id-118</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">In most cases, you can open an e-mail editing window using</div></span>]]></content:encoded></item><item><title>Calling _Execute() from a different thread</title><dc:subject>Knowlbits</dc:subject><dc:date>2006-09-26T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200609_6.HTM#unique-entry-id-119</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200609_6.HTM#unique-entry-id-119</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">You can only call the _Execute VFP API function from within the same thread that Visual FoxPro uses to load the library. Calling the function from a different thread crashes Visual FoxPro. If you need to execute code originating in a different thread, you can use SendMessage, though. Here's the code for the FLL. First of all, you need a variable to hold the window handle:<pre>HWND hWndMain = NULL;</pre>Next, you need a function that a VFP application calls to register the handle</div></span>]]></content:encoded></item><item><title>There is not enough memory to complete this operation</title><dc:subject>Knowlbits</dc:subject><dc:date>2006-09-26T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200609_5.HTM#unique-entry-id-120</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200609_5.HTM#unique-entry-id-120</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">When calling an FLL function you get this error messages, when the FLL creates a new string but doesn't specify a string length:</div></span>]]></content:encoded></item><item><title>Sorting</title><dc:subject>Knowlbits</dc:subject><dc:date>2006-09-25T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200609_4.HTM#unique-entry-id-121</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200609_4.HTM#unique-entry-id-121</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">You find sorting algorithm in most programming languages, but you have to look hard for an implementation of common sorting algorithms in Visual FoxPro. Of course, Calvin Hsia has some on <a href="http://blogs.msdn.com/calvin_hsia/archive/2006/09/19/762305.aspx">his blog</a>, but otherthan that it's getting difficult. The most obvious reason is that Visual FoxPro supports sortingnatively for indexes as well as arrays.</div></span>]]></content:encoded></item><item><title>Record is out of range (#5)</title><dc:subject>Knowlbits</dc:subject><dc:date>2006-09-24T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200609_3.HTM#unique-entry-id-122</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200609_3.HTM#unique-entry-id-122</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">Something tried to access a record that does not exist in the selected table.</div></span>]]></content:encoded></item><item><title>Class Factory cannot supply requested class (0x80040111)</title><dc:subject>Knowlbits</dc:subject><dc:date>2006-09-20T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200609_2.HTM#unique-entry-id-123</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200609_2.HTM#unique-entry-id-123</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">When the Init() method of a VFP COM object returns .F., Visual FoxPro raises this error to the creating application.</div></span>]]></content:encoded></item><item><title>FRX as a cursor</title><dc:subject>Knowlbits</dc:subject><dc:date>2006-09-18T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200609_1.HTM#unique-entry-id-124</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200609_1.HTM#unique-entry-id-124</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">You cannot create an FRX file as a cursor using the CREATE CURSOR command, because FRX files containa UNIQUE field which isn't allowed as a field name:</div></span>]]></content:encoded></item><item><title>KeyPress Event</title><dc:subject>Knowlbits</dc:subject><dc:date>2006-06-02T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200606_2.HTM#unique-entry-id-125</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200606_2.HTM#unique-entry-id-125</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">Qualifier keys such as ALT, CTRL and SHIFT are prioritized in this order. When the user presses a combination of these three keys, the highest qualifier determines the key code. If, for instance, the ALT key is pressed with SHIFT, the key code is the same as if you pressed the key and just ALT. If the user instead presses SHIFT and CTRL, the key code switches to the CTRL combination. Only when the SHIFT key is pressed, you would end up with the SHIFT key code. The following table clarifies this for the U key:<PRE>              nKeyCode  nShiftAltCtrlU                  117 	0Shift+U             85 	1Ctrl+U              21 	2Alt+U               22 	4Shift+Ctrl+U        21 	3Shift+Alt+U         22 	5Ctrl+Alt+U          22  6Shift+Alt+Ctrl+U    22  7 (works only intermittently on my laptop)</PRE>The exception from the rule above is the SHIFT+ALT combination on keyboards that support anALTGR key. SHIFT+ALT+Key and ALTGR+Key trigger the KeyPress event with nShiftAltCtrl=0 and the regular key code.</div></span>]]></content:encoded></item><item><title>Pages objects and the activate event</title><dc:subject>Knowlbits</dc:subject><dc:date>2006-06-01T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200606_1.HTM#unique-entry-id-126</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200606_1.HTM#unique-entry-id-126</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">The Activate event of a page fires under the following circumstances:</div></span>]]></content:encoded></item><item><title>Downloading all images in a page</title><dc:subject>Knowlbits</dc:subject><dc:date>2006-05-26T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200605_6.HTM#unique-entry-id-127</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200605_6.HTM#unique-entry-id-127</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">The following code receives a reference to IE or the web browser control. The code loops through all IMG tags and downloads those that have a picture associated with it. If you also retrieve the text ofa web page, you can store all the content of the page.</div></span>]]></content:encoded></item><item><title>VFP evaluates the ControlSource more often than you might think</title><dc:subject>Knowlbits</dc:subject><dc:date>2006-05-25T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200605_5.HTM#unique-entry-id-128</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200605_5.HTM#unique-entry-id-128</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">When you activate or deactivate a form, VFP evaluates the ControlSource several times, even thoughRefresh isn't called, at all. As long as the ControlSource expression is valid, that's hardly an issue. Invalid ControlSources, however, show a peculiar behavior. In this case we're talking about propertiesbeing the ControlSource.</div></span>]]></content:encoded></item><item><title>Detecting a dopped down combo</title><dc:subject>Knowlbits</dc:subject><dc:date>2006-05-23T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200605_4.HTM#unique-entry-id-129</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200605_4.HTM#unique-entry-id-129</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">VFP triggers the DropDown event when the dropdown part of a combobox is opened. Unfortuantely, there's no correlating DropUp event of any sort. So, you have to rely on other events that aretriggered in this case. The most important one is the When event. To distiguish a user moving the focus into the combobox and the user clicking on the dropdown button, you can use a flag that youset to .T. in the DropDown event. If When is triggered, and the flag is .T., then the user closedthe dropdown area. Set the flag to .F. in this case.</div></span>]]></content:encoded></item><item><title>Displaying an empty page</title><dc:subject>Knowlbits</dc:subject><dc:date>2006-05-12T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200605_3.HTM#unique-entry-id-130</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200605_3.HTM#unique-entry-id-130</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">Displaying a page in a web browser control is easy. Just call Navigate2(). If you need to clear the display you can use the following line:</div></span>]]></content:encoded></item><item><title>Clicking sound</title><dc:subject>Knowlbits</dc:subject><dc:date>2006-05-12T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200605_2.HTM#unique-entry-id-131</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200605_2.HTM#unique-entry-id-131</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">When you call the Navigate2 method in the web browser control, the browser plays the &quot;start navigation&quot; sound. By default, that's a brief clicking sound. To avoid the sound you need to hide the control while calling Navigate2. As this causes a lot of flickering, you want to lock the form while the control is invisible. For ActiveX controls you need to use the LockWindowUpdate() API function.</div></span>]]></content:encoded></item><item><title>Tabindex and SetFocus</title><dc:subject>Knowlbits</dc:subject><dc:date>2006-05-12T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200605_1.HTM#unique-entry-id-132</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200605_1.HTM#unique-entry-id-132</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">TabIndex defines in which order VFP cycles through the container. It doesn't, however, define which control receives the focus if you set the focus to the parent object. If you call the SetFocus() method of a container, VFP sets the focus to the element that has been instantiated first. That is, VFP scans the Objects collection in pyhsical order and sets the focus to the first element that can receive the focus. VFP does <b>NOT</b> set the focus to the control with the lowest TabIndex. The following program demonstrates this.</div></span>]]></content:encoded></item><item><title>Getting rid of automatic restart messages</title><dc:subject>Knowlbits</dc:subject><dc:date>2006-04-26T00:00:00+02:00</dc:date><link>http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200604_1.HTM#unique-entry-id-133</link><guid isPermaLink="true">http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200604_1.HTM#unique-entry-id-133</guid><content:encoded><![CDATA[<span style="font:12px Times-Roman; color:#000000;"><div class="fp-text">To stop the &quot;Windows will restart your computer in 5:00 minutes&quot; messages that comes up after Windows installed an update, you need to stop the &quot;Automatic Updates&quot; service.</div></span>]]></content:encoded></item></channel>
</rss>