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
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
i think you need to save this data to a file or registry.
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!
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!
try this:
you can call getsetting on form load and savesetting on formunload :
INFO: SaveSetting & GetSetting Allow Nested Settings
http://support.microsoft.com/support/kb/articles/Q145/6/94.asp?LN=EN-US&SD=gn&FR=0&qry=Registry&rnk=12&src=DHCS_MSPSS_gn_SRCH&SPR=VBB
HOWTO: Use the Registry API to Save and Retrieve Setting
http://support.microsoft.com/support/kb/articles/Q145/6/94.asp?LN=EN-US&SD=gn&FR=0&qry=Registry&rnk=12&src=DHCS_MSPSS_gn_SRCH&SPR=VBB
SAMPLE: PERSIST.EXE Persists Class Objects with VB6
http://support.microsoft.com/support/kb/articles/Q187/2/99.ASP?LN=EN-US&SD=gn&FR=0&qry=persist&rnk=3&src=DHCS_MSPSS_gn_SRCH&SPR=VBB
you can call getsetting on form load and savesetting on formunload :
INFO: SaveSetting & GetSetting Allow Nested Settings
http://support.microsoft.com/support/kb/articles/Q145/6/94.asp?LN=EN-US&SD=gn&FR=0&qry=Registry&rnk=12&src=DHCS_MSPSS_gn_SRCH&SPR=VBB
HOWTO: Use the Registry API to Save and Retrieve Setting
http://support.microsoft.com/support/kb/articles/Q145/6/94.asp?LN=EN-US&SD=gn&FR=0&qry=Registry&rnk=12&src=DHCS_MSPSS_gn_SRCH&SPR=VBB
SAMPLE: PERSIST.EXE Persists Class Objects with VB6
http://support.microsoft.com/support/kb/articles/Q187/2/99.ASP?LN=EN-US&SD=gn&FR=0&qry=persist&rnk=3&src=DHCS_MSPSS_gn_SRCH&SPR=VBB
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
PropBag.WriteProperty("pro pertyname" ,value[,de faultvalue ])
PropBag.ReadProperty("prop ertyname"[ ,defaultva lue])
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.
PropBag.ReadProperty("prop
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.
ASKER
Thanks
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
Thanks,
Moondancer
Community Support Moderator @ Experts Exchange