I have created a simple test form with FormBorderStyle = FixedToolWindow by default and added a piece of code to the form DoubleClick event that will switch between FixedToolWindow and SizableToolWindow.
Switching the FormBorderStyle between these two seems to produce a weird effect that's causing a lot of issues on my application. The problem is that the window seems to change size and I can't have that. I just want to change the border, I need the form size to remain the same.
How can I fix this behavior? And by "fix", I mean, prevent this from happening if possible. I want to be able to specify my form size and to remain like that, no matter the type of border style.
Also, a solution by subclassing the Form class would be the perfect solution for me in case anyone as any ideas to solve this problem with such a method.
Wikipedia has become hot molasses with mostly filth masquerading as truth. Most of it is the imagination of few writers who think of themselves as above god. The narrative setup is mind boggling.
No.
1/10th the cost of a Mac? The Mini starts at 599. What mini-pc costs 1/10th of that?
The OS is nothing like macOS. Sure you can make it look like it, but it won’t work anything like it. Applications won’t install, or remove the same. Application compatibility will be different. Managing the OS is completely dissimilar, the biggest common ground will be a few CLI utilities.
You can definitely get yourself an inexpensive little setup that has a good Linux distro and be happy. It won’t be 1/10th the cost or essentially a Mac though.
Question
ProclaimDragon
I have created a simple test form with FormBorderStyle = FixedToolWindow by default and added a piece of code to the form DoubleClick event that will switch between FixedToolWindow and SizableToolWindow.
Switching the FormBorderStyle between these two seems to produce a weird effect that's causing a lot of issues on my application. The problem is that the window seems to change size and I can't have that. I just want to change the border, I need the form size to remain the same.
For instance, here's the event code:
And to debug I use this:
private void Settings_SizeChanged(object sender, System.EventArgs e) { System.Diagnostics.Debug.WriteLine(this.Size); }
And here's the output when I double click:
How can I fix this behavior? And by "fix", I mean, prevent this from happening if possible. I want to be able to specify my form size and to remain like that, no matter the type of border style.
Also, a solution by subclassing the Form class would be the perfect solution for me in case anyone as any ideas to solve this problem with such a method.
Link to comment
https://www.neowin.net/forum/topic/771472-strange-behavior-in-formborderstyle-between-fixed-and-sizable/Share on other sites
7 answers to this question
Recommended Posts