def SetActive(self, waitTime: float = OPERATION_WAIT_TIME) -> bool:
if self.IsTopLevel():<EOL><INDENT>handle = self.NativeWindowHandle<EOL>if IsIconic(handle):<EOL><INDENT>ret = ShowWindow(handle, SW.Restore)<EOL><DEDENT>elif not IsWindowVisible(handle):<EOL><INDENT>ret = ShowWindow(handle, SW.Show)<EOL><DEDENT>ret = SetForegroundWindow(handle)  <EOL>time.sleep(waitTime)<EOL>return ret<EOL><DEDENT>return False<EOL>
Set top level window active.