maximize

How to maximize a JFrame through code?

会有一股神秘感。 提交于 2019-11-28 22:21:11
How to maximize a JFrame through code? Try this: f.setExtendedState( f.getExtendedState()|JFrame.MAXIMIZED_BOTH ); this works perfectly till java 7 public class TEST { public static void main(String args[]) { JFrame jf= new JFrame(); jf.setVisible(true); jf.setExtendedState(JFrame.MAXIMIZED_BOTH); } } Swartblits Yea the Toolkit solution ignores the windows task bar and uses the full screen which is not what you want. For an immediate maximise of your form just add this in the JFrame constructor after the InitiateComponents() call. this.setExtendedState(JFrame.MAXIMIZED_BOTH); The class extends

Qt hide minimize, maximize and close buttons

徘徊边缘 提交于 2019-11-28 10:01:47
Do you know how to hide minimize, maximize and close buttons of title bar in Qt. I especially need to hide it on QMainWindow. Set this window flags Qt::Window | Qt::WindowTitleHint | Qt::CustomizeWindowHint Note, that on some platforms it behaves in different way. For example on Mac OS X it Disables, (not hides) close/minimize/maximize buttons ams If you are using Qt qml then, to remove minimize, maximize and close button, set the frameless window flag in the window function in your main.qml file, like below: flags: Qt.FramelessWindowHint lolo67 This can be achived by using an eventFilter on

How to make an undecorated window movable / draggable in JavaFX?

心已入冬 提交于 2019-11-28 07:38:14
I have to create an application in which minimize and maximize button will be disabled. I have used "StageStyle.UNDECORATED" with which the application will not be movable or draggable anymore, so I am searching for any other alternative to make my application. Do anyone having solution for this? To achieve the window to be undecorated but still movable/dragable you have to handle the appropriate MouseEvent on any node of your choice. Example: import javafx.application.Application; import javafx.event.EventHandler; import javafx.scene.Scene; import javafx.scene.input.MouseEvent; import javafx

DragMove() and Maximize

…衆ロ難τιáo~ 提交于 2019-11-27 17:53:45
问题 I have a problem with my custom window (AllowTransparency, WindowStyle=None) in WPF. DragMove() method works good, but when I maximize window, or it maximizing automatically by Windows 7 Aero Snap, this method does not work at all. So I can't unsnap window with mouse drag and return it state to WindowState.Normal. Left and Right Aero Snap works good, I can snap and unsnap window without a problem. But when it maximized, nothing works except Win+Down combination. Maybe somebody knows how to

How can I make a WPF window maximized on the screen with the mouse cursor?

人走茶凉 提交于 2019-11-27 14:19:16
问题 According to the MSDN documentation for the WindowStartupLocation Property: Setting CenterScreen causes a window to be positioned in the center of the screen that contains the mouse cursor. Although the MSDN doc for the CenterScreen Field itself defines it somewhat less clearly as: The startup location of a window is the center of the screen on which it is opened. A simple test shows this working as it should: MainWindow.xaml <Window x:Class="CenterScreenTest.MainWindow" xmlns="http://schemas

How to maximize a JFrame through code?

好久不见. 提交于 2019-11-27 14:18:22
问题 How to maximize a JFrame through code? 回答1: Try this: f.setExtendedState( f.getExtendedState()|JFrame.MAXIMIZED_BOTH ); 回答2: this works perfectly till java 7 public class TEST { public static void main(String args[]) { JFrame jf= new JFrame(); jf.setVisible(true); jf.setExtendedState(JFrame.MAXIMIZED_BOTH); } } 回答3: Yea the Toolkit solution ignores the windows task bar and uses the full screen which is not what you want. For an immediate maximise of your form just add this in the JFrame

Disabling Minimize & Maximize On WinForm?

匆匆过客 提交于 2019-11-27 11:24:20
WinForms have those three boxes in the upper right hand corner that minimize, maximize, and close the form. What I want to be able to do is to remove the minimize and maximize, while keeping the close. I also what to make the close minimize the form instead of closing it. How can this be done? 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. Bind a handler to the FormClosing

Qt hide minimize, maximize and close buttons

陌路散爱 提交于 2019-11-27 03:20:57
问题 Do you know how to hide minimize, maximize and close buttons of title bar in Qt. I especially need to hide it on QMainWindow. 回答1: Set this window flags Qt::Window | Qt::WindowTitleHint | Qt::CustomizeWindowHint Note, that on some platforms it behaves in different way. For example on Mac OS X it Disables, (not hides) close/minimize/maximize buttons 回答2: If you are using Qt qml then, to remove minimize, maximize and close button, set the frameless window flag in the window function in your