Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SET LIBRARY TO in subclassed textbox
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00678034
Message ID:
00678044
Views:
14
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform