Calvin Hsia's WebLog

thoughts from a professional developer

  • Calvin Hsia's WebLog

    I want my own email! MSN Premium

    • 177 Comments
    My 7 year old daughter Wendy has been clamoring for her own email account, among other things (like her own cell phone). She’s been using a computer for years, and has been using my old web server laptop as her main machine, mainly to surf kids...
  • Calvin Hsia's WebLog

    Independence Day for blogging

    • 68 Comments
    Since July 4 th is nearing, I thought it would be appropriate to start my independent blog. In this first entry, I’ll add a few pointers to prior entries that I made to our VSData team blog. Solving a customer problem is my blog narrative describing an...
  • Calvin Hsia's WebLog

    Reboot from remote desktop

    • 64 Comments
    Remote Desktop (mstsc.exe) is great: it allows me to access another remote machine as if I were sitting at its keyboard and seeing its screen. My web server sits on top of a 7 foot tall bookcase but I have no need to touch it: I can use RD from other...
  • 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

    Sample program to create multiple threads

    • 41 Comments
    I used the CreateThread call and the Heap functions to create a simple sample program that spawns a separate thread that displays a MessageBox Try running it and you will see a MessageBox. However, unlike a normal MessageBox in your application, this...
  • Calvin Hsia's WebLog

    Use conditional build events to freshen zip files in Visual Studio

    • 40 Comments
    I wanted to update a couple zip files of the VB version of my Blog Crawler (to be posted soon) with the latest and greatest when I built the Release version of a project. I used the XCOPY command with the /D option to update only if changed. Copying to...
  • Calvin Hsia's WebLog

    What's the greatest invention of all time?

    • 37 Comments
    I read this from Raymond , which prompted this post. To qualify for greatness, an invention would have to affect the most people and benefit humankind in a big way When pondering this question, I’ve heard things like: Wheel Transistor...
  • Calvin Hsia's WebLog

    What is a C0000005 crash?

    • 35 Comments
    In my blog about Dr. Watson I talked about product crashes. What is an example of a crash? How destructive is it? Here’s a simple example. MyFunction takes a string parameter and calculates its length MyFunction ( char * StringParam...
  • Calvin Hsia's WebLog

    Why was the original IBM PC 4.77 Megahertz?

    • 34 Comments
    In 1979, I had a summer job on Long Island , NY designing a circuit board for the front panel of a satellite control system. That was the time Apple II and Radio Shack were top selling computers. We were designing a circuit board that had an embedded...
  • Calvin Hsia's WebLog

    Dr. Watson: Please send in your error report

    • 29 Comments
    I bet you’ve seen dialogs similar to this: We at Microsoft refer to this dialog/technology as Dr. Watson (after the famous Sherlock Holmes assistant). Before Watson, computer users would get the BSOD (The Blue Screen of Death)...
  • Calvin Hsia's WebLog

    Creating a VFP application as a service:

    • 29 Comments
    Sometimes it’s useful to make your application run as a service. A service can run without any user logged in, can automatically start upon reboot, and can survive user logoffs. It can also run as a different user with different access rights. Normally...
  • Calvin Hsia's WebLog

    Create your own Word Search puzzles

    • 27 Comments
    I wrote a Word Search generating program in C++ (308 lines) years ago: my brother used it to generate a puzzle including all the girls in his 8 th grade class, which was 22 years ago: about 1984 (sounds Orwellian<g>). I wrote one in C# (456 lines...
  • Calvin Hsia's WebLog

    Create multiple threads from within your application

    • 25 Comments
    When I posted this Sample program to create multiple threads , I knew the inevitable follow-up question was “can I run my VFP code in separate threads?”. Sure enough, several people asked, citing various valid usage scenarios. Below is a class that...
  • 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

    Is a process hijacking your machine?

    • 25 Comments
    Suppose there is a process on your machine that is hijacking your processor. Perhaps it’s in an infinite loop. Or perhaps you have no idea what a particular process is doing, and you’d like to find out. If you have a debugger installed, like Visual Studio...
  • Calvin Hsia's WebLog

    More Multithread capabilities: interthread synchronization, error checking

    • 24 Comments
    In a prior post: Create multiple threads from within your application , there is a sample Thread Class that can be used to create multiple threads that can execute VFP code. Today’s sample presents code that demonstrates how a thread can send messages...
  • Calvin Hsia's WebLog

    Create a .Net UserControl that calls a web service that acts as an ActiveX control to use in Excel, VB6, Foxpro

    • 23 Comments
    Here’s how you can use Visual Studio to create a .Net User Control that will act as an ActiveX control that can be used in Excel (or other Office application), VB6 or Foxpro. This will bring the power of the entire.Net Framework to your program. This...
  • Calvin Hsia's WebLog

    Create your own typing tutor!

    • 22 Comments
    Here’s an idea to teach somebody the positions of the letters on the keyboard: letters fly in randomly from the right for 30 seconds. Hit the letter on the keyboard for points. Miss and lose points. As time goes on, the letters move faster and there are...
  • Calvin Hsia's WebLog

    Enable crop and zooming in on your digital photograph display form

    • 22 Comments
    I wanted to add the ability to zoom into a portion of a photograph on my photo viewer. Below is some code that processes the MouseUp, MouseDown and MouseMove events to add a yellow dotted-dash selection rectangle using a Shape control that the mouse can...
  • Calvin Hsia's WebLog

    How fast is interop code?

    • 22 Comments
    How fast is interop code? If you’re in one kind of code and your calling another, what is the cost of the interop? For example, .Net code can call native C++ code (like Windows APIs) and vice versa. Similarly with Foxpro and C++ code. .Net code...
  • 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

    Styrofoam Peanuts

    • 21 Comments
    I like the convenience of shopping online. Not only are there lots of goodies available, but it’s easy to jump from store to store with a couple keystrokes. However, it’s very hard to tell if the ordered product is shipped in packaging...
  • Calvin Hsia's WebLog

    Webcrawl a blog to retrieve all entries locally: RSS on steroids

    • 21 Comments
    Today’s sample shows how to create a web crawler in the background. This crawler starts with a web page, looks for all links on that page, and follows all those links. The links are filtered to my blog, but generalizing the code to search the entire web...
  • Calvin Hsia's WebLog

    Create an ActiveX control using ATL that you can use from Fox, Excel, VB6, VB.Net

    • 21 Comments
    Creating an ActiveX control is a good exercise in understanding how one works. It also helps to have full control over its source code for learning and testing purposes. A customer asked about migrating legacy ActiveX controls over to .Net. Many controls...
  • Calvin Hsia's WebLog

    Anachronisms

    • 20 Comments
    My 7 year old daughter was playing with a toy Fisher Price dial telephone. She asked “How does this work?” I had to explain how we had to “dial” a phone. Remember slide rules? (I still use a slide rule: they’re great when you want to have a custom lookup...
Page 1 of 18 (429 items) 12345»