I have a rather large PS Script that opens a windows form. There is an odd behavior that I cant seem to figure out. My system is Windows 10 1809. I am setting the Focus method on the form when it loads to put it in the foreground for the user. The odd behavior is when I lock my screen with Window Key+L. The form is still visible and USABLE. All the controls work on the form work as if the screen was not locked. I should also point out that the script requires run as admin so the form is running as admin as well.
Any ideas on what is going on and how I can prevent this? I would really like to keep the Focus method in the script and not have the form usable when the screen is locked. What add even more of a mystery to this problem is that it is not 100% repeatable. On some occasions, when I lock the screen, the form is not visible.
Any ideas/suggestions are very much appreciated. Thanks in advance.