473,387 Members | 3,810 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,387 software developers and data experts.

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 2211
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
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
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
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
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
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
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
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
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
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
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
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...

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.