Solved

Resize a borderless form with a statusstrip on it.

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

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…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now