Check Process state in an GUI app