
Read/Write Properties During Design Time, but Read-Only During Run-Time
Hi,
To accomplish this requirement in VB, this article can help you:
Creating Design-Time-Only, Run-Time-Only, or Read-Only Run-Time Properties
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbco...
l/vbconcreatingdesigntimeonlyorruntimeonlyproperties.asp
If you want to do this in VC, please use CComControl::GetAmbientUserMode
(BOOL& bUserMode ). This method retrieves DISPID_AMBIENT_USERMODE. This
flag indicates whether the container is in run-mode, TRUE, or design-mode,
FALSE. According to the bUserMode value, you can make a property be
read-only at run time.
Thanks,
Freist