VLFormDesigner Reference

Read/Write PropertyMode

See Also See Also Applies To Applies To

Returns or sets the current mode of operation of VLFormDesigner control

 

Syntax

object.Mode[=value]

 

The Mode property syntax has these parts:

Part Description
Object An object expression that evaluates to VLFormDesigner
Value An integer specifying the current mode of operation of the control, as described in Settings.

 

Settings

The settings for value are:

Constant Setting Description
ConstantvlModeRun 0 Control is in run mode. In this mode the user cannot select, resize or move the contained controls. The grid is automatically hidden and rubber banding by mouse is disabled
ConstantvlModeDraw 1 Control is in draw mode. In this mode the user cannot select, resize or move the contained controls. If grid display in enabled, then grid will be drawn and rubber banding by mouse is enabled.
ConstantvlModeSelect 2 Control is in select mode. In this mode the user can resize or move the contained controls. If grid display in enabled, then grid will be drawn and rubber banding by mouse is enabled.

 

Remarks

The control behaves like a form designer in vlModeDraw and vlModeSelect whereas in vlRun mode it is just a container control like a picturebox.

vlModeDraw is typically used when you want to let user add new control by drag and draw. VLFormDesigner will not add controls automatically, but it will notify end of rubber band drawing, so that you can add an appropriate control at run time at the position specified by the RubberBandEnd event parameters.

vlModeSelect is used to let user move and resize the contained controls. In the mode, user can select multiple controls and move them together. You can also expose aligning and resizing methods which operate on selected controls to let the user align the selected controls or equi-size them as per the requirements.