Skip to content

FormScreenCaptureMode transitions between HideContent and HideWindow do not apply correctly #13680

Closed
@Olina-Zhang

Description

@Olina-Zhang

.NET version

10.0.100-preview.7.25351.106

Did it work in .NET Framework?

Not tested/verified

Did it work in any of the earlier releases of .NET Core or .NET 5+?

This is a new feature introduced by the #13561 in .NET 10 Preview 6

Issue description

When changing the Form.FormScreenCaptureMode value, the following issue occurs:

Changing from HideContent to HideWindow (or vice versa) does not take effect;

The only way to make it apply is to first set the value to Allow, and then to the desired mode (HideContent or HideWindow).

This behavior is unexpected and not intuitive.

Steps to reproduce

  1. Create a Form instance;

  2. Set FormScreenCaptureMode = HideContent;

  3. Then set FormScreenCaptureMode = HideWindow;

form.FormScreenCaptureMode = ScreenCaptureMode.HideContent;
// This change will not take effect
form.FormScreenCaptureMode = ScreenCaptureMode.HideWindow;

WinFormsApp74.zip

Actual Behavior:
Observe that the behavior still reflects HideContent, not HideWindow.

FormScreenCaptureModeIssue.mp4

Expected Behavior
Any change in the FormScreenCaptureMode value should trigger the necessary system-level updates, regardless of whether the mode is Allow, HideContent, or HideWindow.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions