>I'm using a sub-classed text box control to create a textbox that will save the text to the registry when its parent form unloads and retrieve the text from registry when the textbox loads later. In order to do this, I need to use the FOCUS.FLL library to gain access to the 'REG_' functions. The only problem is, SET LIBRARY TO FOCUS.FLL seems to work only within the event I coded. If I issue SET LIBRARY TO in the INIT event (to use REG_ function to retrieve text from registry) VFP returns an error when trying to use REG_ function in DESTROY event with ERROR "File reg_createvalue.prg does not exist". Does SET LIBRARY not persist across the whole life of the control? Do I have to issue SET LIBRARY for every piece of event code?
I usually put all SET CLASSLIB TO my.vcx ADDITIVE calls in main.prg and they persist through the life of the VFP instance.
Eric Kleeman - EDS Consulting Services
MCP Visual FoxPro
MCSD C#.NET
Hua Hin Thailand
Los Angeles California