Vladmir,
FoxPro Advisor had an article by Dan LeClair in April 1997 on how to do this. Using his basic ideas, I created a class that I use for purposes like you explained. If you're interested, I'd be glad to send you a copy.
Scott
----------
Scott King
sking@iglobal.net
Scott King
The Support Source Corporation