LockSetForeground before controlling mouse or keyboard