Solved

Resize a borderless form with a statusstrip on it.

Posted on 2014-02-04
4
969 Views
Last Modified: 2014-02-05
Hi,
Is it possible to resize a borderless form with a statusstrip on it. And resize the form with the sizegrip of the statusstrip.

 Is there an solution.

Peter Kiers
0
Comment
Question by:peterkiers
  • 2
  • 2
4 Comments
 
LVL 40
ID: 39834531
If the AutoSize property of the StatusStrip is set to False, dragging the SizingGrip triggers the Resize event. You could follow what happens there to increment or decrement the Form by the same number of pixels.

This being said, this is a strange idea. There are standard in Windows that enable users to understand what they can do just by the look of things, and a borderless form is an indication that it cannot be enlarged. I am not sure that most users would understand that they can enlarge the form by the sizing grip only.

I would rather go for a Form that has its FormBorderStyle set to SizableToolWindow, ControlBox to False, and no Text. This removes the header but leaves a thick border that is, I think, a clearer way to indicate that a Form can be resized.
0
 
LVL 1

Author Comment

by:peterkiers
ID: 39834567
Could you help me with this:

"If the AutoSize property of the StatusStrip is set to False, dragging the SizingGrip triggers the Resize event. You could follow what happens there to increment or decrement the Form by the same number of pixels"

Peter
0
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 500 total points
ID: 39834874
Borderless form were not designed to be resized. I would go with the solution that I gave you with a SizableToolWindow instead of a borderless form.

If you really want to resize a borderless form, you are on your own, I do not have time to look at it into details and provide you with code, I have too much to do these days, but here is what I would try.

You know the original size of the StatusStrip.

In the resize, check the new size of the StatusStrip and compare it to the original. If it is 5 pixels wider, then the SizingGrip was moved 5 pixels to the right and you need to resize the form 5 pixels wider than it is. If the height is 3 pixels less than the original, then you need to reduce the form height by 3 pixels.

I do not know how the StatusStrip will behave when you do that, so you might have to look if it also needs to be resized or if the docking mechanism will automatically take care of it for you.
0
 
LVL 1

Author Comment

by:peterkiers
ID: 39835220
oke thanks for the info. Peter
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question