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

Unable to set Height and Width of a form

Udi
All,
I have a list box that imitates the intelisence behavior.
Since I need it to be top most, I have put it on a TopMost form (The
listBox docked to Fill).
The form has no parent, no caption and its borderStyle is FixedSingle.
The Listbox IntegralHeight is false.

My problem is that when my listbox contains only one or two items in
it, I can't shrink the parent form to the wanted sizes.
The result is a listbox (form) bigger than needed (In both Height and
Width).
It seems like when the list contains enough items (more than 2 for that
matter),
setting the form Height works fine, but again the Width still doesn't
work.

for example, the line:

this.autoCompForm.Height = 26;

results with Height equals to 34.
Same behavior happens when I try to set Width to a value lesser than
123.

I have searched my code, there's no other place that I touch these
properties.
Any Ideas?
This is really frustrating...
Thanks!
Udi.

Jun 20 '06 #1
1 2571
Hi,
IIRC there is a minimun size for a new window being created.

If you set the border style to SizableWindowTool you can set it even smaller
( 34,26 IIRC )
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Udi" <Ud**********@gmail.com> wrote in message
news:11**********************@u72g2000cwu.googlegr oups.com...
All,
I have a list box that imitates the intelisence behavior.
Since I need it to be top most, I have put it on a TopMost form (The
listBox docked to Fill).
The form has no parent, no caption and its borderStyle is FixedSingle.
The Listbox IntegralHeight is false.

My problem is that when my listbox contains only one or two items in
it, I can't shrink the parent form to the wanted sizes.
The result is a listbox (form) bigger than needed (In both Height and
Width).
It seems like when the list contains enough items (more than 2 for that
matter),
setting the form Height works fine, but again the Width still doesn't
work.

for example, the line:

this.autoCompForm.Height = 26;

results with Height equals to 34.
Same behavior happens when I try to set Width to a value lesser than
123.

I have searched my code, there's no other place that I touch these
properties.
Any Ideas?
This is really frustrating...
Thanks!
Udi.

Jun 20 '06 #2

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

Similar topics

1
by: Arun Nair | last post by:
Hi, I have the following jsp page. I am able to view only a part of it(until the occurence of the first City text box). If i remove the first few fields from the page, I am able to see a few...
12
by: Kepler | last post by:
How do you get the height of the client browser in IE? Both document.body.clientHeight and document.body.offsetHeight return the height of the document. If the page is long and there's a vertical...
0
by: Prescott | last post by:
I want to execute a javascript function that will set a value in the parent window from the child widow where its called and then post the form to the server. I seem to be able to execute one or...
5
by: Kevin Myers | last post by:
How can one obtain obtain the height of a MS Access 2K form? There is a width property, but I don't see a corresponding height property. I need to obtain the height of the form so that I can...
1
by: polocar | last post by:
Ciao a tutti, leggendo qua e là per il forum ho scoperto che non sono l'unico ad avere questo problema. Se si inserisce un controllo ComboBox in un form di C#, non è possibile impostare la sua...
3
by: bhanubalaji | last post by:
hi, I am unable to disable the text(label) in javascript..it's working fine with IE,but i am using MOZILLA.. can any one help regarding this.. What's the wrong with my code? I am...
6
Markus
by: Markus | last post by:
I'm adding to my script a section that allows a thumbnail to be created and saved. I get this error: Warning: imagejpeg() : Unable to open '../uploads/thumb/' for writing: Is a directory in...
3
by: ashishc | last post by:
Hi All, I have written a AutoSuggest in jsp and am using javascript to call the strut page which calls the database and returns me the xml back. On the html page i have a text box where i enter...
4
by: AAaron123 | last post by:
<body runat="server" id="MainBody"> <form id="form1" runat="server" style="background-color:green; width: 100%; height: 100%"> <br /> Table1" runat="server" Style="background-color:Yellow;...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.