Reputation: 624
I am making a program which plays minesweeper automaticaly. I am using the mouse press function to click the squares. Is there a way of giving focus to the minesweeper program without clicking on the tab at the bottom of the monitor??? Thanks
Upvotes: 0
Views: 964
Reputation: 324167
Is there a way of giving focus to the minesweeper program without clicking on the tab at the bottom of the monitor?
You mean the Windows task bar?
An application automatically gets focus when it is started. If the user clicks on another applcation then the user must also request focus to go back to the application by clicking on the task bar or by using Alt-Tab.
If your program doesn't have focus then you can't just grab focus, because the user is in control of the desktop and not your program.
Upvotes: 1