You don't need an API. The WindowState property of the form can be used for that.