Link to home
Start Free TrialLog in
Avatar of nesifa
nesifa

asked on

property bag

I have an ocx called OCX1.
When the acivex loads(executes) I like to get a value from property bag(Sessionid).
When OCX Terminates, I like to place a value -1.
-1 tells me that everything was okay when the user log out.
How can it be done using property bag or......

Thanks
Nesifa
Avatar of rkot2000
rkot2000

i think you need to save this data to a file or registry.
Avatar of nesifa

ASKER

I see applications that you can change some of the poperties of design time. Next time you login, changes has taken place.
Let say I have a label with caption label1.
I want to save some information on label caption, so next time he/she logs in I grab the left over value.
Thanks.
nesifa!
ASKER CERTIFIED SOLUTION
Avatar of rkot2000
rkot2000

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
PropBag.WriteProperty("propertyname",value[,defaultvalue])
PropBag.ReadProperty("propertyname"[,defaultvalue])

Reads and write's from/to property bag. The deafaultvalue is optional, in the writeproperty it ensure no unnescecary memory is used. When the written property is the default property, nothing is written to memory. The default value of the readproperty should be set to the same value. These properties should also be the same you used designing your ocx. You can use the read- and write- property events to implement all this. I hope this will help you.
capkirkie - can you use this to preserve data between vb applications. start application read old data, set new data, stop application, start application and read new data?
No just for saving the properties a programmer changes in design time in your ocx. But I guess you knew that too.
Avatar of nesifa

ASKER

Thanks
Avatar of nesifa

ASKER

Thanks
If this proposed answer has helped you, please accept it, grade it and close this question.  If it did not, reject it and add comments as to your progress and what else is needed.  If no action is taken here by next week, we'll need to decide this outcome.  Expert input always welcome as well.

Thanks,
Moondancer
Community Support Moderator @ Experts Exchange