Planning Form Layout in VB.NET

Getting Started

Let's delve in and find out. We will start out by designing the user interface shown below of my new experimental application -'An expense tracker'. (My 'Guinea pig' to learn dot net technology)

Now when it came to resizing controls first I started experimenting with the anchor and dock properties, but what the hell? Controls would either overlap or move away to opposite extremes of the form, or get jumbled up. Tried all possible stunts to no avail. If you set the anchor property, the dock property would vanish and vice versa. The controls never seemed to care about each other; all that they were concerned was either to stick to an edge of the form or to maintain a constant distance from the edges of the form.

During this process, I observed that there were controls, which could be grouped together, which needed to resize in the same way. This observation finally led me to the idea of using panels to group those controls, and did need to use a little code to get the desired effect. :(

But here is the good news; it is definitely a lot easier than resizing controls in VB6. I still got away writing just a couple of lines of code.

You might also like...


About the author

Benny K. Mathew India

Benny Mathew is the Founder, CEO of Seamless Integration Solutions Pvt. Ltd. He has 10+ years of formal experience in the IT industry and has provided services to many of the well known multi-na...

Interested in writing for us? Find out more.


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Programs must be written for people to read, and only incidentally for machines to execute.”