Window not activated when the application is run from Task Scheduler
问题 In my appplication I am trying to focus a textbox so I can type straight away after the Form is loaded. When the Form is shown, I can see is the cursor blinking in the TextBox but if I type something nothing happens. I need to click the Window to start entering text in the TextBox . If I run my application normally from Visual Studio, it will work perfectly, but if my application is run using the Task Scheduler, then this happens. Do you have any advice? Below is my code: this.TopMost = true;