Export (0) Print
Expand All
C
Col, Row Properties
ColWordWrapOption Properties
Expand Minimize
This topic has not yet been rated - Rate this topic

Visual Basic Reference

Visual Studio 6.0

ClipControls Property

See Also    Example    Applies To

Returns or sets a value that determines whether graphics methods in Paint events repaint the entire object or only newly exposed areas. Also determines whether the Microsoft Windows operating environment creates a clipping region that excludes nongraphical controls contained by the object. Read-only at run time.

Syntax

object.ClipControls

The ClipControls property syntax has these parts:

Part Description
Object An object expression that evaluates to an object in the Applies To list.
Boolean A Boolean expression that specifies how objects are repainted, as described in Settings.

Settings

The settings for boolean are:

Setting Description
True (Default) Graphics methods in Paint events repaint the entire object. A clipping region is created around nongraphical controls on the form before a Paint event.
False Graphics methods in Paint events repaint only newly exposed areas. A clipping region isnt created around nongraphical controls before a Paint event. Complex forms usually load and repaint faster when ClipControls is set to False.

Remarks

Clipping is the process of determining which parts of a form or container, such as a Frame or PictureBox control, are painted when the form is displayed. An outline of the form and controls is created in memory. The Windows operating environment uses this outline to paint some parts, such as the background, without affecting other parts, such as the contents of a TextBox control. Because the clipping region is created in memory, setting this property to False can reduce the time needed to paint or repaint a form.

The clipping region includes most controls, but doesn't clip around the Image, Label, Line, or Shape controls.

Avoid nesting intrinsic controls with ClipControls set to True inside a control with ClipControls set to False (for instance, a command button inside a picture box). This kind of control nesting causes the controls to repaint incorrectly. To fix this problem, set the ClipControls property for both the container control and the nested controls to True.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.