473,320 Members | 1,976 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.

Sizing forms in VB.NET 2003

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

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
noticable.

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
mean.

If anybody has a fix, I'd love to hear from you. I've spent
too much time on this prob. already.
mark
Nov 20 '05 #1
4 4417
the minimum size it seems i can create a form, even in design mode, is 112 pixels. It stays at
112 pixels just fine upon running the program. Im also using VS.NET 2003
"mark" <bi*******@hotmail.com> wrote in message news:05****************************@phx.gbl...
Here's the most concise description I can give you of my
problem...

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
noticable.

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
mean.

If anybody has a fix, I'd love to hear from you. I've spent
too much time on this prob. already.
mark

Nov 20 '05 #2
It should be possible to make the width as small as I wish,
just as I could in Studio 6.0!!

mark
Nov 20 '05 #3
"mark" <bi*******@hotmail.com> scripsit:
It should be possible to make the width as small as I wish,
just as I could in Studio 6.0!!


You can create a rectangular 'Region' from a 'GraphicsPath' and set it
as the form's 'Region' property. You will see the basic way here:

<http://groups.google.de/groups?selm=eLrQHVHfDHA.1736%40TK2MSFTNGP12.phx.gb l>

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #4
the smallest width of a form i can make in VB6 is 104 pixels, and the smallest in .NET 2K3 is 112
pixels. They are the same size at runtime.
"mark" <bi*******@hotmail.com> wrote in message news:07****************************@phx.gbl...
It should be possible to make the width as small as I wish,
just as I could in Studio 6.0!!

mark

Nov 20 '05 #5

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

Similar topics

0
by: mark | last post by:
Here's the most concise description I can give you of my problem... 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...
0
by: Sabine Oebbecke | last post by:
Hi Experts! I have several forms and reports where controls get their values with 'Forms!MainForm!Control' or 'Forms!MainForm!Subform!Control' resp 'Forms!MainForm!Subform.Form!Control' which...
11
by: N. Graves | last post by:
I have checked the "Alignment and Sizing" toolbar but when I want to use in on aligning several form object the toolbar buttons stay grayed out. What am I missing. Thanks! N. Graves
1
by: Andrei Zinca | last post by:
When I resize my window, the sizing grip from the status bar doesn't dissapear. The funny thing is that if i create a graphics object and dispose it before the creation of the status bar everything...
9
by: Max | last post by:
Hello, Using VB.NET, I can activate an application by entering: AppActivate(intProcessID), where intProcessID is the process ID of a running application. Is it possible to set the size and...
1
by: What-a-Tool | last post by:
Have code that is called by my form re-size event. While the form borders are being dragged back and forth, this code will run continuosly, when it really only needs to run at the end of the...
4
by: kaosyeti | last post by:
what's the best way to get a form to always open at a specific size. i've sized and saved the forms, changed the borders and had popup on and off all over but can't seem to get it to stay one way...
6
by: =?Utf-8?B?R3JlZw==?= | last post by:
Yesterday I worked on three forms in my VB Application. I set their initial sizes at 1024,768, with one of them being a MDI Parent form and the other two child forms. Everything was working fine...
4
by: R.A.F. | last post by:
Hi, Basically i've read that under C++ we can avoid flickering forms during sizing (maximize, minimize, restore,...) in SDi/MDI application. I understood that for that i need to override the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
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: 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...
0
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.