# Automation in PxPlus - Appendix

OCX Controls |

The DLL container control exposes all the "ambient" properties that are required by OCX controls. These include foreground/background color, message reflection, user mode, etc.

User mode is the only ambient property that is directly available to the PxPlus programmer; the rest are handled by the DLL. User mode is special in that it tells the OCX control if it should act as a design-time control or as a run-time control.

Example:
Control A displays designer toolbars when UserMode = false but hides these when UserMode = true. In PxPlus, this property is accessed via the 'PVXMODE property. Setting PVXMODE = 0 sets UserMode to false (design-time). Any non-zero value will set UserMode to true (run time).

The DLL also supports OCX control property sheet activation by way of the F2 key. To display an OCX controls property sheet (if it has one), set focus to the control and press F2.