Export (0) Print
Expand All

PrintPreviewDialog.TransparencyKey Property

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

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

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

[BrowsableAttribute(false)]
public Color TransparencyKey { get; set; }

Property Value

Type: System.Drawing.Color
A Color that represents the color to display transparently on the form.

This property is not relevant for this class.

When the TransparencyKey property is assigned a Color, the areas of the form that have the same 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 will send the event notification of the click to any window that is below it. If the color assigned to the TransparencyKey property is the same as any controls on the form, they also will be displayed transparently. For example, if you have a Button control on a form that has its TransparencyKey property set to Control, the control will be displayed transparently unless the BackColor property of the Button control is changed to a different color.

Windows 2000, Windows 2000 Professional, Windows 2000 Server, Windows 2000 Advanced Server Platform Note: Transparent windows and regions are supported only in the Windows 2000 operating system.

.NET Framework

Supported in: 4.5.3, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft