Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Application Design
Message
 
To
31/01/2003 07:55:25
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00747206
Message ID:
00747792
Views:
14
Steven,

I assume your application has either a startup PRG or an initial form (maybe a login form). Place the following code in that PRG or in that form's Init() method:
PUBLIC goUser
goUser = NEWOBJECT( "MyUserObject", "MyUserObjectClassLib" )
This object is now available globally throughout your app. Properties can be referenced using syntax similar to the following:
*-- This line assigns the login name from your login form to the class property
goUser.icCurrentUser = MyLoginForm.txtUserName.Value
*-- This line would be used in your various programs to get that user name
lcUserName = goUser.icCurrentUser
You could use the same technique for password, security level(s), and so on.

Then, as your application quits, the following line of code should exist (either after the READ EVENTS in your PRG or in the Destroy() method of your initial form:
RELEASE goUser
>Evan,
>
>Can you help me to understand how to create an object that is avaliable to the app but not generated by one of my project objects(forms)?
Evan Pauley, MCP
Positronic Technology Systems LLC
Knoxville, TN

If a vegetarian eats vegetables, what does a humanitarian eat?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform