System.Windows.Forms.Form.TransparencyKey Property

Gets or sets the color that will represent transparent areas of the form.

Syntax

public System.Drawing.Color TransparencyKey { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

When the Form.TransparencyKey property is assigned a System.Drawing.Color, the areas of the form that have the same Control.BackColor will be displayed transparently. Any mouse actions, such as the click of the mouse, that are performed on the transparent areas of the form will be transferred to the windows below the transparent area. For example, if the client region of a form is made transparent, clicking the mouse on that area would send the event notification of the click to any window that is below it. If the color assigned to the Form.TransparencyKey property is the same as any controls on the form, they also will be displayed transparently. For example, if you have a System.Windows.Forms.Button control on a form that has its Form.TransparencyKey property set to SystemColors.Control, the control will be displayed transparently unless the Control.BackColor property of the System.Windows.Forms.Button control is changed to a different color.

This property is not supported when Form.RightToLeftLayout is true.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0
Since: .NET 2.0