How to make PyQt window state to maximised in pyqt
From the docs: self.showMaximized()
From the docs: self.showMaximized()
Try this: f.setExtendedState( f.getExtendedState()|JFrame.MAXIMIZED_BOTH );
You can set it in XAML <Window Height=”300″ Width=”300″ WindowState=”Maximized”> </Window> You need to set SizeToContent to Manual. See other answers for details.
The Form has two properties called MinimizeBox and MaximizeBox, set both of them to false. To stop the form closing, handle the FormClosing event, and set e.Cancel = true; in there and after that, set WindowState = FormWindowState.Minimized;, to minimize the form.