如何停止启用Windows 10功能“焦点辅助”?

我正在使用C#WinForms创建覆盖。叠加层的大小必须与当前屏幕相同(或大于当前屏幕的大小)。但是,它不需要启用“聚焦辅助”功能。

我尝试使用Formwindowstate.Maximized和P / Invoke MoveWindow,但是一旦窗体的大小与屏幕大小相同(或大于屏幕大小),就会启用焦点辅助。

这是我到目前为止的代码:

覆盖表单构造器

this.DoubleBuffered = true;
this.SetStyle(ControlStyles.OptimizedDoubleBuffer |
    ControlStyles.DoubleBuffer |
    ControlStyles.UserPaint |
    ControlStyles.AllPaintingInWmPaint |
    ControlStyles.SupportsTransparentBackColor,true);

SetWindowLong(this.Handle,GWL_EXSTYLE,(IntPtr)(GetWindowLong(this.Handle,GWL_EXSTYLE) | WS_EX_LAYERED | WS_EX_TRANSPARENT | WS_EX_NOactIVATE));
SetLayeredwindowAttributes(this.Handle,128,LWA_ALPHA);
this.TopMost = true;
this.windowstate = Formwindowstate.Maximized;

MoveWindow

Screen screen = Screen.FromPoint(Cursor.Position);
MoveWindow(this.Handle,screen.Bounds.X,screen.Bounds.Y,screen.Bounds.Width,screen.Bounds.Height,true);

如果有任何方法可以禁用此功能,我尚未找到它。任何想法将不胜感激。

heminminzjl 回答:如何停止启用Windows 10功能“焦点辅助”?

目前,无法以编程方式打开/关闭Focus Assist。

有一些hacks,但我不建议您使用它们。

本文链接:https://www.f2er.com/3146077.html

大家都在问