473,657 Members | 2,593 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.IsMdiConta iner = 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 2231
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*****@merits olutions.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.IsMdiConta iner = 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(fixe d
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
3340
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 appreciated. Here is the code and form: <script type='text/javascript'> function form1_onsubmit() { var form = document.MyInput var controlCounter; var returnValue = true;
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 child form meaning,
1
4747
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 I have run into I am not sure how to fix, and really not sure what is causing it. Here's what is going on (test server - Windows 2003 Server): I have a page in a folder (under anonymous authentication in IIS6) that has a link on it that...
5
4077
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 both projects. Both controls(dlls) have been signed using SN.exe and I've set up the appropriate .Net assembly permissions using those Strong Names The DLL's have been copied to the /bin directory in both web virtual directories.
3
1531
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 varibale with one title and not the top 10.. not sure what i am doing wrong... Note: keyword retrival code will be between ######## //comment CODE #######
4
7999
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> .top-label {
4
12520
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 them using a new location (toolstrip.Location = new Point(x,y) does not work. Is there any property, which allows the Location setting not to be ignored or is there any property helping to get the result as described? In my special case the...
1
2804
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 right-hand edge of the textbox. The textbox renders correctly on Firefox and Netscape. <%@ Page Language="VB" AutoEventWireup="false" CodeFile="test.aspx.vb" Inherits="Content_test" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0...
8
16091
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 which modifies Application setting section but how to add new item to userSettings ? Andrus.
0
8385
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8821
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8723
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8502
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8602
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7316
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
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 we have to send another system
2
1601
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.