Calvin Hsia's WebLog

thoughts from a professional developer

  • Calvin Hsia's WebLog

    What is taking up the space on your hard disk? TreeMap it!

    • 21 Comments
    Several years ago, I saw a presentation from Microsoft Research about online communication in communities . In particular, a group was studying online communities based on NewsGroup message traffic volume. One of the results was a graphical view of the...
  • Calvin Hsia's WebLog

    Running out of space ? What's on your disk?

    • 8 Comments
    Often a hard disk gets close to full and undesirable things happen, especially on the volume that contains Windows. For example, suppose Windows Update is chugging along and runs out of space. How does it gracefully handle that? How can you determine...
  • Calvin Hsia's WebLog

    SQL Select data from a text file

    • 2 Comments
    It’s often very useful to be able to execute a SQL SELECT statement on a text file. I was debugging a multiprocess multithread Foxpro COM DLL problem in a COM+ application . To help diagnose the problem, I wanted to figure out the sequence...
  • Calvin Hsia's WebLog

    Randy's Devcon Demo

    • 4 Comments
    Randy is using my blog as part of a Demo at the Devcon keynote. He has some Fox code running from Outlook that allows the user to add RSS feeds that the user wants to subscribe to. Hopefully if his demo works, this message shows up in Randy’s Outlook...
  • Calvin Hsia's WebLog

    Data Entry for dates: autoincrement tip

    • 4 Comments
    A handy tip that is not widely known: When a VFP textbox contains a date or datetime field, the user can hit the “+” or “-“ keys to increment or decrement the date portion by one day. Also works for BROWSE It’s been this way since at least the foxpro...
  • Calvin Hsia's WebLog

    Write your own Task Manager

    • 20 Comments
    Often an error message occurs: “The process cannot access the file because it is being used by another process.” Typically it occurs when you try to copy or rebuild the file. How do you determine which process is using it? One way to release the...
  • Calvin Hsia's WebLog

    Application logging and Error methods

    • 3 Comments
    I have some Fox classes that run in several modes. The normal fox interactive design environment In a runtime Multithreaded DLL from the fox interactive environment In a runtime Multithreaded DLL from within a client application (like windows...
  • Calvin Hsia's WebLog

    Activation Key

    • 8 Comments
    Remember the old days when downloading a large file was a rare occurrence and your modem was the size of a box of Girl Scout Cookies? About 20 years ago you could dial up a bulletin board and start a download of some software. Come back an hour...
  • Calvin Hsia's WebLog

    Binding to Internet Explorer events: bug in Typelibrary

    • 4 Comments
    I was using the web browser control and getting some errors when binding to its events. This can be duplicated with the code below. To generate the event class, open the object browser (Tools->Object Browser) and select the Microsoft Web Browser...
  • Calvin Hsia's WebLog

    What's the difference between Internet Explorer and Explorer?

    • 4 Comments
    From the navigate bar of either, you can type a web URL like www.msn.com or a local file path like “c:\Windows” In this post I showed how VFP can use the web browser control easily. Try opening a few instances of IE and a couple of Windows...
  • Calvin Hsia's WebLog

    Word to audible speech

    • 54 Comments
    Here’s some interesting code to run. It starts Microsoft Word and binds some Fox code to some Word events. Type some text into the document. Select some text. When the Selection Change event occurs, the Foxpro code creates the speech API object...
  • Calvin Hsia's WebLog

    Your VFP runtime splash screen

    • 4 Comments
    A customer asked the following: “When VFP starts wee see it's splash screen almost immediately after the mouseclick, then it disappears when VFP is finished starting up. If I develop a splash screen in my Fox app it shows after the runtime is in...
  • Calvin Hsia's WebLog

    Put your registry into a table

    • 3 Comments
    It’s pretty easy to use Foxpro to examine the registry. Here’s some simple recursive code I whipped up to put registry keys into a table. # define HKCU BITSET ( 0 , 31 )+ 1 CLEAR LOCAL oreg as "registry" OF HOME ()+"samples\classes\registry...
  • Calvin Hsia's WebLog

    Third Party application does work as a COM+ application

    • 2 Comments
    A few months ago, I reported a problem that a customer was having with a particular 3 rd party product that seemed not to work with Visual FoxPro. It was a COM object that could be instantiated via CreateObject. I was quite surprised that Windows...
  • Calvin Hsia's WebLog

    Very Old Program

    • 9 Comments
    I was doing some spring cleaning and came across a computer printout of a program I wrote in August 1974, or about 31 years ago! That brings back a lot of memories. Coincidentally, a couple coworkers were discussing the CaSing of computer languages. What...
  • Calvin Hsia's WebLog

    Floating Point calculations: comparing with zero

    • 9 Comments
    I was asked about floating point calculations. In particular, I can write code like this: x= 3.4 y= 10 Result=x*y ?Result,Result= 34 IF Result= 34 ?"This code will execute if result = 34" ENDIF *Output is 34.0 .T. ...
  • Calvin Hsia's WebLog

    April Fool's Pranks

    • 6 Comments
    In the spirit of April Fool’s Day, I was talking to my daughter about some pranks that took place in my college days. I mentioned the abundance of liquid nitrogen and what happens to a flower immersed in it for a few seconds: it becomes very brittle and...
  • Calvin Hsia's WebLog

    Calling the Windows APIs for Large Files

    • 5 Comments
    A customer was trying to use FoxPro to handle large files. The files that Fox handles natively (like tables, indexes) are limited to using 32 bit addressing, (2^32 = 4 gigs). Back in the old days (not that long ago), there were no hard disks > 2 gigs...
  • Calvin Hsia's WebLog

    Memory Handles

    • 10 Comments
    I was asked a question about how VFP uses memory: Recently, on a project to determine and resolve memory leaks in a VFP7 app (which is calling Lotus Notes v4.6), I was using the SYS(1011) function call. One thing I noticed was that the first time I called...
  • Calvin Hsia's WebLog

    Sharing Disneyland Digital pictures

    • 5 Comments
    A family reunion in Disneyland means bring my camera ! I wanted to make sure that the digital pictures I took were saved and shared. If you run out of film with film cameras, you can just buy more film wherever you are. However, when running out of digital...
  • Calvin Hsia's WebLog

    Relaxen und watchen das blinkenlights. What lights?

    • 25 Comments
    In the old days, computers had blinking lights. Indeed, old movies used to show computers working with blinking lights and tape reels moving back and forth. My school computer was a PDP-8/L with a whopping memory of 4K 12 bit words back in 1971. (Here...
  • Calvin Hsia's WebLog

    Undocumented APIs and 16 bit DLLs

    • 18 Comments
    As a long time software company, Microsoft has certain procedures to follow when releasing software to the public. A change to the policy was instituted at Microsoft last year. A brand new tool would scan all released software to see if any “undocumented...
  • Calvin Hsia's WebLog

    Intercept power broadcast messages: How do you tell if Bindevent is really successful? SendMessage!

    • 2 Comments
    Question: BINDEVENT( ) always returns 1 when a Windows message event binding is created. Soooo, how do you know it was actually successful? If I always get a 1 from BindEvent() and AEVENTS() is always populated, all regardless of success, how do I know...
  • Calvin Hsia's WebLog

    How to use a COM interface when there is no COM object ?

    • 2 Comments
    I was asked a question: In VFP9 I am attempting to access StructuredStorage via the stgOpenStorageEx function in OLE32.DLL ( http://msdn.microsoft.com/library/default.asp?url=/library/en-us/stg/stg/stgopenstorageex.asp ). I am ok with that. The catch...
  • Calvin Hsia's WebLog

    Decoding the timestamp in class libararies and forms

    • 4 Comments
    I was asked Is there a way to translate the timestamp in a VCX to a human readable format? Visual Foxpro puts a timestamp on many records in the table that represents a form or class library. Historically this field was used to match records across supported...
Page 15 of 18 (429 items) «1314151617»