472,345 Members | 1,585 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,345 software developers and data experts.

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 1665

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

Similar topics

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...
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...
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...
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...
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...
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 -...
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...
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) ...
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...
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...

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.