Recompress your digital pictures to save space

I have 23,000 digital pictures and movies taking many gigabytes of storage from the past decade or so. The more recent ones are larger, because higher resolution cameras were more readily available. I have a few copies of the entire collection on various computers for backup. I would like to save some space, perhaps to…

8

DECLARE DLL allows OBJECT type

Before VFP7, it was very difficult to get an object back from a DECLARE DLL call. I added the “OBJECT” type for VFP7 which allows you to call a DLL which returns a COM object reference.  Luckily, most COM objects are created from other COM objects, and very few DLL APIs return COM objects. The…

1

Are water and salt the only inorganics we consume?

Of all the naturally occurring foods/drinks that humans normally ingest, is it true that all but two of them contain carbon? In any case, these 2 are very common. Maybe there’s a candy bar I don’t know about that doesn’t have carbon<g>. (Of course I mean pure H2O and pure NaCl.).   I suppose that…

3

Use Regular Expressions to get hyperlinks in blogs

At Southwest Fox conference I presented a sample calling a VB.NET server to do regular expression matching. Here’s the sample I used. It gets some HTML from my blog and parses all the hyperlinks (looks for the HREF tags) and puts them into a VFP table:   First create a VB server: A Visual Basic…

4

Eliminating Fire Alarm sound at Chess Tournament Awards Ceremony

My daughter earned a 4th place trophy out of 100 competitors in her division at a chess tournament, far ahead of all other unrated players. As a proud parent, I wanted to get a photo and video of the trophy presentation to hear how the award was presented.  Unfortunately, just before the awards, the fire…

2

Excel’s new gradient Data Bar feature is cool: you can do it too!

I’ve seen demos of Excel 12 and it’s conditional formatting Data Bar and thought it was cool. In each cell, it draws a colored gradient bar with a width proportional to the cell’s value, making it easy to spot the largest/smallest values.   So I wrote a little code to do something similar in VFP. …

12

Fox helps drag racer win Microsoft Start Something Amazing Award

It was very impressive to see a computer using FoxPro helping a 15 year old drag racer win competitions. When I started reading about it, I thought it must be some sort of simulation: don’t you have to be older to drive? Then I saw the video, which clearly showed it was not a car…

10

What happens if external code throws an exception?

In VFP, there are many features to call external code, such as ActiveX controls, COM servers, DECLARE DLL or  SET LIBRARY TO. In older versions, you could even LOAD and CALL machine code.  If such external calls caused a crash for some reason, what should happen? In VFP5 and earlier, the exception was unhandled, and…

6

Intentionally crash your program

When developing the Watson error reporting features (see Dr. Watson: Please send in your error report, and What is a C0000005 crash?, What was Dr. Watson’s original name?)) it was useful to cause a crash intentionally   In VFP we have a simple way to crash intentionally. Try executing this: SYS(1079)   A MessageBox comes…

8

Is this a bug in the View Parent Code button?

We received a bug report   Steps to Reproduce : 1) Create MyButtonClass1 class of MyButtonLibrary1.  Add code to click method. 2) Create MyFormClass1 class of MyFormLibrary1. 3) Add commandbutton of class created in step1.  Add code to commandbutton’s click method. 4) Create MyFormClass2 class of MyFormLibrary2.  Add code to commandbutton’s  click method.  Include DODEFAULT()…

4