Interactively experimenting with controls: the Slider

I have a simple form that can show an individual photograph, or at the push of a button, show an array of thumbnails. It is a simple client front end for my collection of about 18000 digital photos and home movies. The thumbnail view shows about 100 pictures, depending on the screen resolution. I can…

1

Fox plays music

I received a customer question:   I have searched the net and asked as many people as I could and could not get an answer, so I am bothering you. Do you know of a way to get VFP to play mp3 format tunes? There must be a way to use a media player driver…

10

Foxpro Performance tip: field name lookup for tables

When FoxPro opens or uses a table or cursor, internally we have to keep track of the field names used in that table.   For example, this statement creates a table with 3 fields.   CREATE TABLE foo (lastname c(10), firstname c(10),address c(20))     When encountering a line of code:               x =…

12

Creating a VFP application as a service:

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, Creating a service is fairly complex, but creating a VFP application…

31

Sending Christmas cards: Creating mailng labels automatically

A family member sent out an emergency email plea for help:   I bought labels: Avery 8160, which have very clear instructions about how to enter names and addresses manually, but nothing about how to use data from an Excel file to do so. Avery.com tells me what fancy things to buy. Excel Help only…

14

Using non-Automation compatible types

A customer asks:   I’m using a third party COM server dll with my VFP8 application. One of its methods requires a structure as a parameter. It seems to me that unlike with dlls, where you can trick VFP into substituting a character string for a structure in a DECLARE statement, this can’t be done…

3

Intellisense: inspecting live objects

In this entry I talked about a performance improvement of FoxPro’s object handling.   I showed an example of object based programming:   oExcel=CREATEOBJECT(“excel.application”) oExcel.   A live instance of Excel is created. When you type the “.”, intellisense shows the methods and properties of the Excel Application object.   Nick Parker asked in a…

2

Unbelievable performance gain by changing an Algorithm

Visual Foxpro added Object Oriented Programming in version 3 which was released about 10 years ago. Back then users weren’t expected to use very many objects. Nowadays, with more memory, users create thousands of objects, and things were slowing down.   OOP means that the user can create an object then send it commands by…

9

Another customer problem: a product doesn’t work with VFP

A customer reported that a product they have doesn’t work with Visual Foxpro. Time to put on the detective hat!   In the command window, type               o= CREATEOBJECT(“ABCProduct.Application”)   After hitting the Enter key, the FoxPro process crashes.   I tried from Excel, in the Visual Basic Editor and it worked fine: Dim…

3

Programmatically add a watch expression to the debug watch window

A user may want to add a particular variable or expression to the Visual Foxpro debug watch window   Here’s some code to do it.   The debugger can read/write a particular debug config file. The default is stored in the fox resource file. Or you can choose File->Save Configuration to save various configurations.   Try…

1