Solved

Resize a borderless form with a statusstrip on it.

Posted on 2014-02-04
4
988 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

830 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