473,441 Members | 1,515 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,441 software developers and data experts.

stop window from resizing

hi all, thx for any help that you can give.

iv got a System.Windows.Forms.form and i want to make it so that it will not
resize when it gets to a certan size. e.g. if the window gets to a width of
50 i don't want it to be able to get any smaller, but the user can still
make it bigger if they wish.

iv tried creating a resize event and doing it through that but could not
seem to get it to work. i then thought id try to override the OnResize
method but that did not work eather.

Thx Scott.
Nov 17 '05 #1
2 1609
Have a look at the Forms "MinimumSize" property.

--
Tim Wilson
..Net Compact Framework MVP

"scott" <sc***********@hotmail.com> wrote in message
news:d8**********@newsg2.svr.pol.co.uk...
hi all, thx for any help that you can give.

iv got a System.Windows.Forms.form and i want to make it so that it will not resize when it gets to a certan size. e.g. if the window gets to a width of 50 i don't want it to be able to get any smaller, but the user can still
make it bigger if they wish.

iv tried creating a resize event and doing it through that but could not
seem to get it to work. i then thought id try to override the OnResize
method but that did not work eather.

Thx Scott.

Nov 17 '05 #2
Hi,

Use Form properties MinimumSize and MaximumSize,

Regards,
Josip Habjan, Croatia
http://www.habjansoftware.com
"scott" <sc***********@hotmail.com> wrote in message
news:d8**********@newsg2.svr.pol.co.uk...
hi all, thx for any help that you can give.

iv got a System.Windows.Forms.form and i want to make it so that it will
not
resize when it gets to a certan size. e.g. if the window gets to a width
of
50 i don't want it to be able to get any smaller, but the user can still
make it bigger if they wish.

iv tried creating a resize event and doing it through that but could not
seem to get it to work. i then thought id try to override the OnResize
method but that did not work eather.

Thx Scott.

Nov 17 '05 #3

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

Similar topics

10
by: David McCulloch | last post by:
The following code opens a new window, but the "resizeTo" doesn't resize it. Why not? (Don't ask why I simply did not open the window with the new size....my original problem was how to open a...
4
by: David Logan | last post by:
Hello, I am trying to open a window with a graphic in it and have the window be exactly the correct size of the image. Is there anyway to do this that will work on any browser on any OS???? ...
18
by: Andrew Poulos | last post by:
If I manage to call the following bit of javascript in IE and MZ w = window.open("", "s", 'status=no,resizable=no,width=450,height=450'); I get a window that is not resizable and without a...
14
by: D. Alvarado | last post by:
Hello, I am trying to open a window containing an image and I would like the image to be flush against the window -- i.e. have no padding or border. Can I make this happen with a single call to a...
3
by: Darren | last post by:
OK, this should be really simple, but I still can't see where I can set an option to prevent Windows Media Player 9 from resizing the window when it loads at startup or when a file is played. I...
2
by: Dan | last post by:
Hello, I am just now converting from the world of DOS. Making simple VB.NET apps was easier than I expected. Now I need some control over the window that the app is running in. Can a VB.NET...
1
by: DaveG | last post by:
Hi All I am having a small problem with window.open() obviously something I am or am not doing. This is being fired from a subwindow. Everytime I use just the location.href = "URL" I got a...
7
by: Dr J R Stockton | last post by:
I want page <URL:http://www.merlyn.demon.co.uk/js-quick.htmto open, in IE6, IE7, Firefox 2, and wherever else practicable, with the control labelled F.X0 fully visible at the top of the window and...
4
by: qhimq | last post by:
hi I built a program on windows 2000 professional and it works flawlessly to the eye. I can resize the window and all of it's contents scales correctly. I moved it onto windows XP with a setting...
1
by: =?Utf-8?B?V29ua28gdGhlIFNhbmU=?= | last post by:
Hello-- Is there a "WPF way" of telling why a Window's size was changed? In other words, is there a way to tell if the dialog was dragged bigger by the user versus a window automatically...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
1
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.