ACAT.Extensions.Default.FunctionalAgents.LectureManager.LectureManagerMainForm.clickOnThisWindow C# (CSharp) Method

clickOnThisWindow() private method

Restore focus to this window by simulating a mouse click on it. This seems to be the only fool-proof reliable method to make sure that the window has focus.
private clickOnThisWindow ( ) : void
return void
        private void clickOnThisWindow()
        {
            if (Visible)
            {
                int xpos = Left + 5;
                int ypos = Top + 5;

                Point oldPos = Cursor.Position;
                MouseUtils.ClickLeftMouseButton(xpos, ypos);
                Cursor.Position = oldPos;
            }
        }