Repaint window when no users are logged in

天涯浪子 提交于 2019-12-11 17:47:26

问题


Is it possible to repaint a window when there are no active users logged on to a windows machine using c sharp? And will that window be available to screen capture program? Or is it not possible at all and a user must be logged into the machine.

I make use of the below:

SetForegroundWindow(handle);

InvalidateRect(IntPtr.Zero, IntPtr.Zero, true);

UpdateWindow(handle);

Thanks all for any help


回答1:


Since there is no user logged in, there is no UI running.

So, no, you can't repaint under such circumstances (there is no window to repaint).




回答2:


Yes it is, the logon screen is a special desktop (Windows can have several desktops). A smilar question (but not identical): WPF Window on Winlogon Desktop

More information on desktops and the winlogon desktop: http://msdn.microsoft.com/en-us/library/ms682573(v=vs.85).aspx



来源:https://stackoverflow.com/questions/5695235/repaint-window-when-no-users-are-logged-in

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!