Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Toolbar - Help
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Title:
Miscellaneous
Thread ID:
00540571
Message ID:
00540843
Views:
11
I actually have an app class with methods that are used by my forms, menus, reports, etc. I also have numerous properties that hold info like the current User's ID, workstation configuration parameters [e.g., is a cash drawer or receipt printer attached, to what port [if any], how many receipts to print if there is a receipt or single sheet printer, etc.].

At the startup of the app, I instanciate this object in the VFP default datasession [DS 1]. This object is visible to anything else I instanciate for the life of the app. Therefore, all its public properties and methods are available to anything in my app.

I can also add properties to this object on the fly to hold references to other objects like toolbars.

>Thanks, your message got me to thinking. and I played arround with the _vfp object. which seems to be everpresent. What I think I can do is use that, with the activeform propertity, and get the class name from that..... is this what you intended ? (I have never yet used the _vfp object. I just wanted to make sure that I am going in the direction you are pointing.
>
>Thanks
>Bob Lee
>
>>What I do is store an object reference to my toolbars in a property of my global app object [goApp]. Then when I need it, I just call a ToolbarShow() method of goApp. When it needs to disappear, I call a ToolbarHide() method in my goApp object. You can tie this to a form property as well, and put the ToolbarShow() in the Activate of your base form class, and ToolbarHide() in the Deactivate.
>>
>>>I have made a generic toolbar class , <snip>
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform