Read/Write Properties During Design Time, but Read-Only During Run-Time 
Author Message
 Read/Write Properties During Design Time, but Read-Only During Run-Time

Hi All,

You may have heard of HasDC property present on some of the VB
controls. This property allows you to have controls with a dedicated
DC during its lifetime. It is a simple True/False property that you
set in VB when you design your App. However, this property becomes
Read-only during run-time. How is something like this acomplished?


Sun, 01 Feb 2004 10:02:10 GMT  
 Read/Write Properties During Design Time, but Read-Only During Run-Time

To accomplish this requirement in VB, this article can help you:

Creating Design-Time-Only, Run-Time-Only, or Read-Only Run-Time Properties

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.


Sun, 01 Feb 2004 18:06:56 GMT  
 [ 2 post ] 

 Relevant Pages 

1. Change dialog property during run-time?

2. Changing control properties during run-time?

3. Design time properties at run time...

4. ADO controls during run-time

5. Cannot load dll-functions during run time

6. removing a control and disable message during run-time

7. Creating Multi-Dim. arrays during run time

8. Changing Icons on a button during run time.

9. Resizing window during run time

10. Changing Dialog Caption during run time

11. Multilingual Apps: Changing Lang. during Run-time

12. Resource types during run-time


Powered by phpBB® Forum Software