maximize-window

How to show a form again after hiding it?

落花浮王杯 提交于 2019-11-30 15:54:52
问题 I have two forms. I need to open a second form with a button. When I open form2 I hide form1. However when I try to show form1 again from form2 with a button it doesn't work. My form1 code is: Form2 form2 = new Form2(); form2.ShowDialog(); Inside form2 code: Form1.ActiveForm.ShowDialog(); or Form1.ActiveForm.Show(); or form1.show(); (form1 doesn't exist in the current context) doesn't work. I do not want to open a new form Form1 form1 = new Form1(); form1.ShowDialog(); I want show the form

How to show a form again after hiding it?

笑着哭i 提交于 2019-11-30 15:21:40
I have two forms. I need to open a second form with a button. When I open form2 I hide form1. However when I try to show form1 again from form2 with a button it doesn't work. My form1 code is: Form2 form2 = new Form2(); form2.ShowDialog(); Inside form2 code: Form1.ActiveForm.ShowDialog(); or Form1.ActiveForm.Show(); or form1.show(); (form1 doesn't exist in the current context) doesn't work. I do not want to open a new form Form1 form1 = new Form1(); form1.ShowDialog(); I want show the form which I hided before. Alternatively I can minimize it to taskbar this.WindowState = FormWindowState

What can I do about maximized, styled windows, which show their borders on adjacent monitors?

半世苍凉 提交于 2019-11-30 04:54:27
On a multi-monitor system, a "blank" VCL application maximizes fine, but the same application with styles enabled (and one chosen as default) maximizes incorrectly. What I'm seeing is the right-hand edge of the window extend onto the 2nd monitor (my main is on the left). When I started comparing to other Windows apps, I noticed that under Windows 7 (at least), maximized windows do not even have non-client borders on the left, right or bottom sides. And indeed, the standard VCL (non-styled) app behaves this same way, without non-client borders. How do I fix this? I notice that TFormStyleHook

How can I remove just the Maximize button from a JFrame?

放肆的年华 提交于 2019-11-27 20:24:27
I have a JFrame and want to remove the maximize button from that. I wrote the code below, but it removed maximize, minimize, and close from my JFrame . JFrame frame = new JFrame(); frame.add(kart); frame.setUndecorated(true); frame.setVisible(true); frame.setSize(400, 400); I want to only remove the maximize button from the JFrame . Make it not resizable: frame.setResizable(false); You will still have the minimize and close buttons. You can't remove the button from a JFrame . Use a JDialog instead. It doesn't have a maximize button. import java.awt.event.WindowAdapter; import java.awt.event

JFrame Maximize window

…衆ロ難τιáo~ 提交于 2019-11-27 17:55:44
I'm putting together a quick and dirty animation using swing. I would like the window to be maximized. How can I do that? Provided that you are extending JFrame: public void run() { MyFrame myFrame = new MyFrame(); myFrame.setVisible(true); myFrame.setExtendedState(myFrame.getExtendedState() | JFrame.MAXIMIZED_BOTH); } Something like this.setExtendedState(this.getExtendedState() | this.MAXIMIZED_BOTH); import java.awt.*; import javax.swing.*; public class Test extends JFrame { public Test() { GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment(); this.setMaximizedBounds

Automatically maximize a figure

女生的网名这么多〃 提交于 2019-11-27 06:41:00
I am creating some figures in MATLAB and automatically save them to files. The problem that by definition the images are small. A good way to solve my problem by hand is to create an image (figure), maximize it, and save to a file. I am missing this step of automatically maximize a figure. Any suggestions? Up till now I only found this: http://answers.yahoo.com/question/index?qid=20071127135551AAR5JYh http://www.mathworks.com/matlabcentral/newsreader/view_thread/238699 but none are solving my problem. This worked for me: figure('units','normalized','outerposition',[0 0 1 1]) or for current

How can I remove just the Maximize button from a JFrame?

馋奶兔 提交于 2019-11-27 04:27:12
问题 I have a JFrame and want to remove the maximize button from that. I wrote the code below, but it removed maximize, minimize, and close from my JFrame . JFrame frame = new JFrame(); frame.add(kart); frame.setUndecorated(true); frame.setVisible(true); frame.setSize(400, 400); I want to only remove the maximize button from the JFrame . 回答1: Make it not resizable: frame.setResizable(false); You will still have the minimize and close buttons. 回答2: You can't remove the button from a JFrame . Use a

Automatically maximize a figure

一世执手 提交于 2019-11-26 12:06:52
问题 I am creating some figures in MATLAB and automatically save them to files. The problem that by definition the images are small. A good way to solve my problem by hand is to create an image (figure), maximize it, and save to a file. I am missing this step of automatically maximize a figure. Any suggestions? Up till now I only found this: http://answers.yahoo.com/question/index?qid=20071127135551AAR5JYh http://www.mathworks.com/matlabcentral/newsreader/view_thread/238699 but none are solving my