Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Resize a borderless form with a statusstrip on it.

Posted on 2014-02-04
4
Medium Priority
?
1,055 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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 Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

660 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