Sign in
Calvin Hsia's WebLog
thoughts from a professional developer
Translate This Page
Translate this page
Powered by
Microsoft® Translator
Options
Email Blog Author
RSS for posts
Atom
RSS for comments
OK
Search
Tags
64bit
C++
CSharp
Debugging
FunGames
History
LINQ
Memory
Mesh
Miscellaneous
Pictures
Programming
SmartPhone
Testing
VB
Vista
Visual FoxPro
Visual Studio
Web
Windows API
WPF
Archive
Archives
April 2013
(2)
March 2013
(1)
February 2013
(1)
January 2013
(1)
December 2012
(1)
November 2012
(1)
October 2012
(1)
September 2012
(1)
August 2012
(1)
July 2012
(1)
June 2012
(1)
May 2012
(2)
March 2012
(1)
February 2012
(1)
January 2012
(1)
December 2011
(1)
November 2011
(1)
October 2011
(1)
September 2011
(1)
August 2011
(1)
July 2011
(1)
June 2011
(1)
May 2011
(1)
April 2011
(1)
March 2011
(1)
February 2011
(1)
January 2011
(1)
December 2010
(2)
November 2010
(1)
October 2010
(1)
September 2010
(1)
August 2010
(1)
July 2010
(1)
June 2010
(1)
May 2010
(1)
April 2010
(1)
March 2010
(2)
February 2010
(1)
January 2010
(1)
December 2009
(1)
November 2009
(1)
October 2009
(1)
September 2009
(1)
August 2009
(1)
July 2009
(1)
June 2009
(1)
May 2009
(1)
April 2009
(1)
March 2009
(2)
February 2009
(1)
January 2009
(2)
December 2008
(1)
November 2008
(1)
October 2008
(1)
September 2008
(1)
August 2008
(1)
July 2008
(3)
June 2008
(2)
May 2008
(2)
April 2008
(2)
March 2008
(2)
February 2008
(2)
January 2008
(2)
December 2007
(3)
November 2007
(8)
October 2007
(6)
September 2007
(4)
August 2007
(9)
July 2007
(2)
June 2007
(2)
May 2007
(11)
April 2007
(5)
March 2007
(2)
February 2007
(2)
January 2007
(1)
December 2006
(2)
November 2006
(1)
October 2006
(4)
September 2006
(6)
August 2006
(10)
July 2006
(13)
June 2006
(11)
May 2006
(7)
April 2006
(8)
March 2006
(14)
February 2006
(5)
January 2006
(21)
December 2005
(9)
November 2005
(19)
October 2005
(20)
September 2005
(12)
August 2005
(23)
July 2005
(12)
June 2005
(8)
May 2005
(7)
April 2005
(4)
March 2005
(1)
February 2005
(2)
January 2005
(13)
December 2004
(9)
November 2004
(4)
October 2004
(10)
September 2004
(4)
August 2004
(8)
July 2004
(1)
June 2004
(10)
Posts
Subscribe via RSS
Sort by:
Most Recent
|
Most Views
|
Most Comments
Excerpt View
|
Full Post View
Calvin Hsia's WebLog
A Visual Basic COM object is simple to create, call and debug from Excel
Posted
over 8 years ago
by
CalvinH
8
Comments
At the SouthWest Fox conference in Phoenix I asked “How many people have Visual Studio?” Almost everybody raised their hand. Then I asked “How many people have used it?” Very few hands were raised. Here’s a simple way to create some VB.Net code and call...
Calvin Hsia's WebLog
My toys over the years
Posted
over 8 years ago
by
CalvinH
8
Comments
At the Southwest Fox conference, I showed a slide titled “My Toys” I showed the computer, the processing speed and the amount of memory in a table: Year Machine CPU Speed Megabytes Product (Mhz*MB) 1971 PDP-8 .066 .004 .000264 1981 IBM...
Calvin Hsia's WebLog
Tools->Options->Dump out settings changed
Posted
over 8 years ago
by
CalvinH
7
Comments
Try this: ACTIVATE WINDOW "debug output" Now choose Tools->Options. Shift-Click on OK You’ll see the options dialog settings echoed to the Debug Output window. (in versions prior to VFP9, it will be echoed to the Command window...
Calvin Hsia's WebLog
That was the worst natural disaster to hit the US
Posted
over 8 years ago
by
CalvinH
7
Comments
A coworker’s family was hit hard by Katrina. She’s collecting donations in our cafeteria today and tomorrow. Don’t be surprised if you see more Foxpro conference bags/backpacks/t-shirts in Mississippi ! Here’s her blog post about it: Save Waveland...
Calvin Hsia's WebLog
Balloons and Planes: cabin pressure
Posted
over 8 years ago
by
CalvinH
6
Comments
Next time you’re on a plane (or a submarine!), take along some scotch tape and a balloon. While you’re on the ground, waiting for take-off, inflate the balloon. Wrap the balloon with the tape around the equator and note how the tape constricts the...
Calvin Hsia's WebLog
Ctrl-C to capture MessageBox and dialogs
Posted
over 8 years ago
by
CalvinH
4
Comments
There was a tip at SouthWest Fox conference attributed to Drew Speedie . Ctrl-C on an error dialog captures the text of the dialog including the error message to the clipboard. Try this: Type x=y in the command window and hit enter to cause...
Calvin Hsia's WebLog
Replace VFP Native dialogs with your own
Posted
over 8 years ago
by
CalvinH
4
Comments
I wrote a sample while developing the MENUHIT feature that shows how to replace a native VFP dialog. The code below replaces the Add Property dialog, adding such features as preserving user CaSe for properties and adding to the Favorites tab using the...
Calvin Hsia's WebLog
Why can't I browse my table?
Posted
over 8 years ago
by
CalvinH
3
Comments
You can open a table with a UNC path in it, such as USE \\myserver\myshare\path\table or USE \\123.456.123.123\myshare\path\table or USE h:myshare\path\table && where h is mapped to a network drive or USE \\www.myserver...
Calvin Hsia's WebLog
String Optimization: More detail
Posted
over 8 years ago
by
CalvinH
3
Comments
In the prior post ( String Optimization. How does it work? ) I described an optimization of how the Assignment statement calls the expression evaluator for string concatenation statements. There are certain limitations with this optimization. For example...
Calvin Hsia's WebLog
What is the workarea alias when a trigger is executed?
Posted
over 8 years ago
by
CalvinH
3
Comments
When a trigger fires, VFP code is executed. What is the workarea while executing that code? CREATE DATABASE xx CREATE TABLE temp ( name c( 10 )) CREATE TABLE AnotherTemp ( name c( 10 )) CREATE TRIGGER ON temp FOR INSERT as name !=ShowAlias...
Calvin Hsia's WebLog
Local vs Private variables
Posted
over 8 years ago
by
CalvinH
3
Comments
I received a question: As you know most of variables in methods and procedures are local, not private. Its very tedious to declare them as local every time. Why don't you do something like SET PRIVATE OFF in VFP? When it is on(by default) -all...
Calvin Hsia's WebLog
Do you know everything about Factorials?
Posted
over 8 years ago
by
CalvinH
3
Comments
When I was in 7 th grade at Amity Junior High School in Orange Connecticut , I gave a presentation on Factorial numbers. Here’s some interesting code: FOR i = 1 TO 80 ?i,Factorial(i), SQRT ( 2 * PI ()*i)*(i/ EXP ( 1 ))^i ENDFOR ...
Calvin Hsia's WebLog
Database Events in Stored Procedures can have default code
Posted
over 8 years ago
by
CalvinH
3
Comments
Try running this code: CLOSE DATABASES all CREATE DATABASE test MODIFY DATABASE nowait Now choose Database->Properties (or Alt-Enter) to bring up the Database Properties dialog . This is where you can choose Database Events to fire...
Calvin Hsia's WebLog
Why did I get an error while publishing Photos?
Posted
over 8 years ago
by
CalvinH
3
Comments
I was publishing some photos/movies of my 27 month old son taking ski lessons (see Sharing Digital Pictures of your friend's ) and I received an unexpected error. I narrowed down the code to this fragment: CPATH= "c:\inetpub\wwwroot\" CREATE...
Calvin Hsia's WebLog
How to hook command window keystrokes
Posted
over 8 years ago
by
CalvinH
2
Comments
A customer asked how to hook events for the command window. The sample below uses BINDEVENT to hook the WM_KEYDOWN , WM_KEYUP and WM_CHAR messages. It changes all ‘a’ keystrokes to ‘b’. * From C:\Program Files\Microsoft Visual Studio .NET...
Calvin Hsia's WebLog
Customer question: detectan F10 keypress
Posted
over 8 years ago
by
CalvinH
2
Comments
I received this question: Is there any way to detect an F10 keypress in the KeyPress() event? It looks like F10 is a system key of some sort (ALT?). It’s similar to this post: How to hook command window keystrokes I just modified...
Calvin Hsia's WebLog
Find out when your password expires
Posted
over 8 years ago
by
CalvinH
2
Comments
I didn’t like to get the warning that my password expires 14 days before. I like to wait til the last minute, cuz then I’ll have to change it less often. Thus I’d like to make the warning come up later. Just change this registry value: HKEY_LOCAL_MACHINE...
Calvin Hsia's WebLog
DynamicBackColor
Posted
over 8 years ago
by
CalvinH
2
Comments
A customer asked about how to change the colors in a grid dynamically. The code below changes the 3 rd column’s backcolor if the row is selected. You can change the code to be based on a value in the row too. PUBLIC ox USE ( SET ("Resource...
Calvin Hsia's WebLog
Optimization question from a reader
Posted
over 8 years ago
by
CalvinH
1
Comments
I received a question: …I've always been curious about code like this: IF wParam=ASC("a") wParam=ASC("b") ENDIF Is it more appropriate to think of ASC("a") as the Fox equivalent of a C 'a', or is it an actual function call every time through? ...
Calvin Hsia's WebLog
Run the wizards modelessly
Posted
over 8 years ago
by
CalvinH
0
Comments
Most of the wizards that are shipped with FoxPro are modal forms. You can run them Modelessly, which means you won’t be in the “Wizard” mode and so you can go to the command window and type a command, or inspect some of the wizard variables. ...
Page 1 of 1 (20 items)