Platforms to show: All Mac Windows Linux Cross-Platform

Back to Window class.

Window.WindowDisplayAffinityMBS as Integer   New in 25.3

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Window MBS Util Plugin 25.3 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop only
The window display affinity.

Specifies where the content of the window can be displayed.
The display affinity setting that specifies where the content of the window can be displayed.

This parameter can be one of the following values:

NameValueMeaning
None 0Imposes no restrictions on where the window can be displayed.
Monitor1The window content is displayed only on a monitor. Everywhere else, the window appears with no content.
ExcludeFromCapture&h11The window is displayed only on a monitor. Everywhere else, the window does not appear at all. One use for this affinity is for windows that show video recording controls, so that the controls are not included in the capture.

This property is designed to support the window content protection feature that is new to Windows 7. This feature enables applications to protect their own onscreen window content from being captured or copied through a specific set of public operating system features and APIs. However, it works only when the Desktop Window Manager(DWM) is composing the desktop.

It is important to note that unlike a security feature or an implementation of Digital Rights Management (DRM), there is no guarantee that using SetWindowDisplayAffinity, will strictly protect windowed content, for example where someone takes a photograph of the screen.

Starting in Windows 10 Version 2004, ExcludeFromCapture is a supported value. Setting the display affinity to ExcludeFromCapture on previous version of Windows will behave as if Monitor is applied.
(Read and Write computed property)

The items on this page are in the following plugins: MBS Util Plugin.


The biggest plugin in space...