473,396 Members | 1,804 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Restricting the resizing of forms

I've been unable to find a simple answer to what I initially thought
was going to be a simple question. I want to be able to restrict the
size of my forms in a VB.net project. I don't want users to be able to
make the forms either smaller or bigger than the size I've set them at.
How is this done?
Thanks.

Sep 8 '06 #1
4 1774
Look at the FormBorderStyle property of the form.

I've been unable to find a simple answer to what I initially thought
was going to be a simple question. I want to be able to restrict the
size of my forms in a VB.net project. I don't want users to be able
to
make the forms either smaller or bigger than the size I've set them
at.
How is this done?
Thanks.

Sep 8 '06 #2

Ja**********@ec.gc.ca wrote:
I've been unable to find a simple answer to what I initially thought
was going to be a simple question. I want to be able to restrict the
size of my forms in a VB.net project. I don't want users to be able to
make the forms either smaller or bigger than the size I've set them at.
How is this done?
Thanks.
You have two options... If you don't want the form resized at all,
then look at one of the Fixed* styles in the forms FormBorderStyle
property. If you want to let the form resized, but you want to set
limits on the maximum/minimum size, then look at the forms MaximumSize
and MinimumSize properties.

--
Tom Shelton

Sep 8 '06 #3
In the forms "Layout" event, you can check the form's location and size then
reset both the location and/or size if the user has exceeded your
restrictions.
--
Dennis in Houston
"Darhl Thomason" wrote:
In the form's properties, set FormBorderStyle to one of the "Fixed" options
(each as a different look), MaximizeBox to False, and MinimizeBox to False.
You will be left with a form that is not sizeable and has no maximize or
minimize buttons, only an "X" in the corner. If you don't want the "X"
either, set the ControlBox to False.

d
<Ja**********@ec.gc.cawrote in message
news:11**********************@p79g2000cwp.googlegr oups.com...
I've been unable to find a simple answer to what I initially thought
was going to be a simple question. I want to be able to restrict the
size of my forms in a VB.net project. I don't want users to be able to
make the forms either smaller or bigger than the size I've set them at.
How is this done?
Thanks.


Sep 8 '06 #4
In the form's properties, set FormBorderStyle to one of the "Fixed" options
(each as a different look), MaximizeBox to False, and MinimizeBox to False.
You will be left with a form that is not sizeable and has no maximize or
minimize buttons, only an "X" in the corner. If you don't want the "X"
either, set the ControlBox to False.

d
<Ja**********@ec.gc.cawrote in message
news:11**********************@p79g2000cwp.googlegr oups.com...
I've been unable to find a simple answer to what I initially thought
was going to be a simple question. I want to be able to restrict the
size of my forms in a VB.net project. I don't want users to be able to
make the forms either smaller or bigger than the size I've set them at.
How is this done?
Thanks.

Sep 8 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: no-spam | last post by:
Hello, I have an HTML question that I'm not sure can be solved. I want to restrict the maximum size of an inline image. For example, I can force the image to be 200x200 if I do this: <img...
11
by: Sharon | last post by:
I'm writing a new control derived from UserControl. I need to get an event when the control is done resizing. I tried the Resize, SizeChanged, Move and the Layout events and I also tried to...
0
by: Sam Barham | last post by:
I have a ListView control, for which I have overwritten the WndProc method to gain access to the WM_PAINT message and generate my own OnPaint and OnPaintBackground messages, in order to colour the...
2
by: Nina | last post by:
Hi there, I've tried everything that I know to prevent usre resizing datagrid columns, but nothing works. Following are the code that I used. Please tell me what's wrong with them. Thank you....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.