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

Sizing forms in Visual Basic.NET...

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
Jul 21 '05 #1
0 1717

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

Similar topics

3
by: Wayne Wengert | last post by:
In VB6 I used to use frmForm1.Show to make a form visible to the user and then use Unload frmForm1 to unload it. I have an app in which I need to "load" and "unload" forms based on user actions....
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...
4
by: Luisa Lopes | last post by:
Dear colleagues: I read somewhere that you could obtain the results of a query as a form. I have design a database for my books and waht I would like is to obtain the results of my queries...
4
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...
3
by: DotNetNewbie | last post by:
I am reading the book Teach Yourself Microsoft Visual Basic .Net 2003 in 21 Days. I am having trouble getting one of the exercises to work at the end of day 4. Exercises: 1. Create a new...
1
by: Nick | last post by:
Hi Has anyone encountered the "readonly" issue with Microsoft Forms 2.0 TextBox ? The locked property of the control seems to have no effect - always enabled regardless of whether it's set to...
1
by: MikeB | last post by:
I'm at university and have a course on Visual Basic. I have two books: Visual Basic 2005 by Willis (WROX) Visual Basic 2005: The Language by Balena (Microsoft publishing) Yet in neither of...
1
by: Geoff | last post by:
VB6. When selecting from drop down menu options I display different forms by using the Load (filename) and leave the form with Unload(Filename) The Load event allows me to program the ...
18
by: jello_world | last post by:
I am a VB6 programmer and I know how to build console apps.. I just dont understand how to get my mind around WinForms; they just seem a lot more complex than VB6. Thanks -Charlie
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
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...
0
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...

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.