473,503 Members | 1,769 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem in setting the width of a form to 20

Hi !

I am facing a wierd problem in setting the width of a form to 20.

Suppose I create two forms Form1 and Form2.

Form1 is the container, meaning
this.IsMdiContainer = true;

Form2 is child form meaning,
f = new Form2();
f.Location = new Point(200,200);
f.MdiParent = this; //Form1 is the parent
f.Show();

I set the width of my Form2 to 20. Yet when it is displayed on Form1, its
width is much larger, way beyond 100. I checked all the properties for Form2
yet I am not able to get the Form2 of thinner width. FormBorderStyle of
Form2 is none. Is there any trick or am I not setting some property?

Regards,
Paresh.


Nov 15 '05 #1
2 2216
Paresh,

Are you able to manually size the form to a width of 20? You can easly test this by placing a textbox on the form which is set in the Size event to the current width. I think there is a minimum that you can set the width and the height of forms to, and you could be trying to exceed that width.

Hope this helps.

-Nicholas Paldino [.NET/C# MVP]

On Fri, 26 Sep 2003 12:44:13 +0100, Paresh Dhakan <pd*****@meritsolutions.ie> wrote:
Hi !

I am facing a wierd problem in setting the width of a form to 20.

Suppose I create two forms Form1 and Form2.

Form1 is the container, meaning
this.IsMdiContainer = true;

Form2 is child form meaning,
f = new Form2();
f.Location = new Point(200,200);
f.MdiParent = this; //Form1 is the parent
f.Show();

I set the width of my Form2 to 20. Yet when it is displayed on Form1, its
width is much larger, way beyond 100. I checked all the properties for Form2
yet I am not able to get the Form2 of thinner width. FormBorderStyle of
Form2 is none. Is there any trick or am I not setting some property?

Regards,
Paresh.


Nov 15 '05 #2
You can set size to 20 if you set borderstyle to none or toolwindow(fixed
or sizable). Otherwise minimum size seems to be 123.

There might be some way to override the form to set regular windows to
smaller sizes.

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Nov 15 '05 #3

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

Similar topics

2
3329
by: Frank Py | last post by:
I'm tring to use a validation function example from WROX that looks at form fields on a submit. I can't seem to launch it. I have 2 other functions up in the header that work fine. Any help...
1
293
by: Paresh Dhakan | last post by:
Hi ! I am facing a wierd problem in setting the width of a form to 20. Suppose I create two forms Form1 and Form2. Form1 is the container, meaning this.IsMdiContainer = true; Form2 is...
1
4732
by: Andrew | last post by:
Hey all, Working on revamping our Intranet here and making use of the LDPA, Active Directory, Directory Services, etc. that .Net provides. I am still fairly new on this subject, so the problem...
5
4062
by: Segfahlt | last post by:
I need a little help here please. I have 2 win forms user controls in 2 different projects that I'm hosting in 2 different virtual directories. The controls have been test and operate okay in...
3
1520
by: Chris H | last post by:
Ok in the following code I am trying to have my keywards meta tag auto insert the top 10 titles from most recently added database entries, right now the while loop is only setting the $keyword...
4
7990
by: aamirghanchi | last post by:
Hi, I am hoping if there is a kludge in IE6 to make the textbox align with the top label. It aligns perfectly fine in Opera and in Netscape/Firefox to some extent. Thanks. <style>...
4
12507
by: =?Utf-8?B?TWljaGFlbCBIYWJlcmljaHRlcg==?= | last post by:
Hi, I'm adding 5 ToolStrips to a ToolStripPanel (ToolStripContainer, TopContainer) and see them ordered in three rows, starting on the left side. I want to have it in one row all. Trying to join...
1
2795
by: =?Utf-8?B?d2NsYXJrZTEwMQ==?= | last post by:
Hello all, I've created the following ASP.NET code sample which, when rendered, displays a 100% textbox within a single cell table. The problem is that Internet Explorer (6 or 7) truncates the...
8
16083
by: Andrus | last post by:
..NET 2 Winforms application. How to create new setting and set it default value in userSettings section of app.config file or overwrite existing setting value ? I found code below in this list...
0
7199
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
7323
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
6984
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...
1
5005
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
4670
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3162
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
1507
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
732
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
377
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.