470,810 Members | 1,326 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,810 developers. It's quick & easy.

Sizing forms in Visual Basic.NET...

Here's the most concise description I can give you of my

I'm trying to create a narrow form in Visual Basic.NET
2003. The form is about 95 pixels wide by 325 long. I
resized it to these dimensions in the development
environment. I've set the FormBorderStyle property to
FixedSingle. I've set controlbox, minimizebox, and
maximizebox to false because I don't want the form size to
be tampered with, and because I want to make room for a
title. So far, so good. However, when I run the code in the
development environment or compile it and run the
executable, my form will not maintain the dimensions I
originally set. The height is fine, but the width increases
about 75% to about 150 pixels as a best guess. I've tried
setting the width programatically, but it still pops up to
this minimum value. If I widen the form beyond this value,
everything is fine--the dimensions stay as I set them, but
if I go anywhere below this minimum value the width pops
right back up again. This goes for FixedSingle, Fixed3D and
FixedDialog border styles. The FixedToolWindow style seems
to work ok, but that's not the border style I want. I've
created forms in VB 6.0 with exactly the same dimensions
and property settings, and never had any problems.

I tried to fix the problem by fiddling with the minimumsize
and maximumsize properties, but this just created another
problem. By default, the minimumsize and maximumsize
properties are set to 0 width and 0 height. I decided to
set the dimensions for both these properties to the same
dimensions as my form. Sure enough, when I ran my code the
form came up with the correct width. However, when I tried
to drag the form around the desktop, it was like trying to
drag around an oil tanker. The form was heavy and choppy as
I moved it. There was a lot of lag between the movement of
the mouse and the positioning of the form. It was very

The bottom line is that when I'm above this minimum width
value, which in my case is about 145 to 150 pixels,
dragging is sharp and responsive. When I manage to coax my
form width to below this minimum value, dragging is heavy
and lagging.

Something's wrong here. I shouldn't have to "coax" my forms
to any width setting I want, and I shouldn't have to deal
with performance problems "depending" on that width setting.

I've updated to Studio.NET. Now, for reasons I've outlined
above and others, I wish I had my old Studio 6.0 back. I'm
kicking myself for that one.

I encourage anybody out there with access to Studio.NET to
try to reproduce these problems, and then you'll see what I

If anybody has a fix, I'd love to hear from you. I've spent
too much time on this prob. already.
Jul 21 '05 #1
0 1623

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Wayne Wengert | last post: by
reply views Thread by mark | last post: by
4 posts views Thread by Luisa Lopes | last post: by
4 posts views Thread by mark | last post: by
1 post views Thread by Nick | last post: by
1 post views Thread by MikeB | last post: by
1 post views Thread by Geoff | last post: by
18 posts views Thread by jello_world | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.