Hi all,
I have a VB.net program that runs for 24 hours and scans a directory for files then displays the results in a RichTextBox window when they are present.
The user presses a key on the keyboard once the contents are viewed and clears the RTB and deletes the file.
My "program" will occasionally lose focus and the keyboard input is redirected away from the main Program.
A mouse is not connected so the user is not clicking on another program or portion of the screen.
This program restarts automatically at 4am daily and it's hit or miss if the keyboard stays connected to my program.
This application is the only program running on this computer.
I've checked for windows scheduled tasks, there are some google updates and a few other update applications running. Short of deleting them I'd like find a way to regain focus of the keyboard.
Cheers,
KB
What I have tried:
I have this at program startup and during the file scanning procedure with no results.
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
Me.WindowState = FormWindowState.Maximized
Me.TopMost = True
If I click on the program the keyboard will continue to work.