Monthly Archives: May 2005

Using BindEvent to tie the DblClick method of a grid's controls to the grid itself is a lot easier than swapping in a replacement textbox. It took me a while to come up with generic code that uses CurrentControl but I figured it out in the end:

local oColumn as Column, oGrid as Grid
oGrid = thisform.grdExampleGrid

for each oColumn in oGrid.Columns
	bindevent(evaluate("oColumn." + oColumn.CurrentControl), "DblClick", oGrid, "DblClick")

I was in another grid today, where the control source for a column is a memo field and there's an editbox bound to the contents of the memo. To force… Continue reading

I was pointing a colleague to Christof Wollenhaupt's paper on Security In Foxpro when I noticed he has posted the other paper he presented at Prague 2003, How Foxpro Works Internally. It's a very interesting read..

Since VFP3 I've wanted to be able to present end users - under specific circumstances - with a MessageBox containing a Help button. The user views the associated help file, and then makes their choice of the MessageBox options.

It hasn't been possible (using standard Windows MessageBox functions) until VFP9: previous versions of VFP ignored the WM_HELP message that the API function MessageBox passed to it.

Of course, now we have BindEvent(), and the impossible becomes trivial. Annoyingly, VFP help doesn't work on the computer I am sitting at but here's a proof-of-concept: I'll try to come back and add… Continue reading