Questions tagged [windowstate]

70 questions
0
votes
0 answers

Extending 50% to 50% On WindowState Maximized Mode On The Winforms Project

When the WindowState is "Normal", I can locate the controls on the left side and the right side by 50% to 50%. I want to locate the controls on the left side and the right side by 50% to 50% on the "Maximized" mode. For this, I set the anchors of…
user1372430
0
votes
3 answers

WPF(How can i set Screen resolution of different size of PC)

I am new to WPF. I have a problem setting the window screen. I have two PCs with different resolution. I am developing on one PC, but I can not run it on the other PC due to screen resolution. I tried below code in XAML…
0
votes
1 answer

lineNumbersCanvas.Width Causing Exception When WindowState=Maximized

Getting a strange error, when I set my WindowState = Maximized (works fine If I set it to Normal and then full screen!!). Debug gives me a nasty exception and was hoping to get some pointers here. Exception: System.NullReferenceException was…
0
votes
0 answers

windows state maximised method cuts maximised window into half

I'm trying to maximize a window when the user clicks on the maximize button. The problem is that the method that I use cuts the window in half whenever it's maximized: Here is the method that I used : void OnStateChanged(object sender, EventArgs…
panelist
  • 21
  • 1
0
votes
0 answers

c# center button in windowstate

The following problem: I need to center a button in my Form. How do I do this? Current code: static void Main(string[] args) { Form scherm; scherm = new Form(); scherm.WindowState = FormWindowState.Maximized; button1 = new…
0
votes
0 answers

restoring from tray does not work (windowState)

I have followed some guides and it seems to be a very simple task. still, I cannot make it work. I can minimize app to tray: private void Form1_Resize(object sender, EventArgs e) { if (FormWindowState.Minimized ==…
Zorak
  • 709
  • 7
  • 24
0
votes
1 answer

Member 'FormWindowState.Minimized' cannot be accessed with an instance reference

I am trying to call this method from another class. public void minimize() { System.Windows.Application.Current.Dispatcher.Invoke(new Action(() => { var min = new MainWindow(); …
Sivvio
  • 297
  • 2
  • 7
  • 22
0
votes
0 answers

ExtendedState not returning to maximized/re-centered condition

When I create my JFrame, I start out with it maximized and in the center of the window using: setExtendedState(java.awt.Frame.MAXIMIZED_BOTH); setLocationRelativeTo(null); However, when I move my frame from the docked location to somewhere else on…
ave8tor
  • 3
  • 2
0
votes
1 answer

c# how to apply WindowState, FormBorderStyle and Bounds changes to multiple forms at once?

I have buttons in an options menu that i want to be able to change the style of every form at once. At the moment it only applies to the options menu itself because I've used "this." private void Fullscreen_toggle_Click(object sender, EventArgs…
Tom1
  • 77
  • 1
  • 6
0
votes
1 answer

Swing windowStateChanged listener returns previous property values of components

I have a Swing application with a JSplitPane and I want to get the width of the JSplitPane as soon as the window is maximized or restored. But I can't seem to get the correct value, it always returns the previous width of the JSplitPane. Not the…
m4heshd
  • 773
  • 9
  • 23
0
votes
0 answers

Why windowstates are relative to each other?

I have 3 forms in my windows forms application. 1. is main form and it is mdiParent. 2. is a mdiChild form which will shown in maximised state. 3. is another mdiChild which will shown in normal state. when I open form2 it will shown in maximised…
Kia Boluki
  • 315
  • 3
  • 15
0
votes
1 answer

WPF - Incorrect Window resolution after setting Window.Windowstate to Maximized programmatically

So I'm trying to open a maximized Window on my secondary monitor. It all works fine, except it's height is 2 pixels lower than it should be. My secondary monitor has a resolution of 1280x1024. However once I inspect the window, it's 1280x1022. Does…
CareX
  • 3
  • 7
0
votes
0 answers

SetWindowPlacement does not set Window.WindowState

In our common project, the position and size of the application's main window (WPF window) is set using the API's SetWindowPlacement method. The WINDOWPLACEMENT's showCmd has value 3. After the call, the window is actually maximized, the upper right…
Michael
  • 51
  • 4
0
votes
1 answer

How to access windows in another session

I am developing an application for observing other applications (including applications of another user sessions) My application should collect information about CPU loading, memory usage and state of main window (if exists) of each application. Now…
0
votes
1 answer

Delphi MDI Child forms and MainMenu

We are upgrading a Delphi 5 application to Delphi XE7. The application has a number of MDIChild (FormStyle fsMDIChild) forms which open with WindowState wsNormal. When I open one of these forms, and close it again, my main menu (TMainMenu) on the…
oxydog
  • 1
  • 2