473,395 Members | 2,795 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.

Formatting of visual basic form is disturbed when form maximized

I am starting to use visual basic for learning. I am facing this problem that when I maximize a form after placing some buttons and controls on it, the placement of all buttons and controls gets disturbed. Their location is completely messed up after maximizing the form. Please help. Thanks.
May 1 '15 #1
3 1526
Seth Schrock
2,965 Expert 2GB
If you are using visual studio as your IDE, then check each control's Docked and Anchor properties. These are the properties that control what happens when the form is maximized. By default, the Docked property is empty and the Anchor property is set to top and left.
May 3 '15 #2
Thanks seth. Yes dock and anchor property defines the placement of controls on form. But these have very limited options i-e top, fill and bottom etc. and secondly these have to be set for all the controls one by one.
When we maximize the screen, isn't there a way that the controls get maximized automatically, remaining at the same position on the form as these were before maximizing. As in the case of MS power point the inserted pictures, text and buttons gets maximized at the same location when we run the presentation, is there a way to fix their location in visual basic?
May 4 '15 #3
Seth Schrock
2,965 Expert 2GB
I don't know of any setting that you can change to make that happen. The only way that I know of would be to calculate the size percentages of each control to the size of the form. For example, if when the form is small it is 400 by 300 and a textbox has the Top and Left settings at 10 and 10. When the form gets maximized lets say that it becomes 800 by 600 (yes this probably won't be the actual size, but it is easier to calculate in this hypothetical situation). Then you would need to change the Top and Left properties to 20 and 20. You would also have to do the same thing with the Height and Width properties. For every single control. You might find it easier to make it so that they can't maximize the form or just anchor everything to top and left. If you choose the later, all the controls should stay organized the same way, but you will have a big blank space in the bottom right corner of your form.
May 4 '15 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Kurien Baker Fenn | last post by:
How to send data from an ASP form to a visual basic form? Please help
3
by: Jacob Thastrup | last post by:
Hi This is propably easy to answer but how do I make sure that my controls stay in a certain area of my form. Right now if I maximize my form the controls will stay in their original position and...
0
by: evlpupy | last post by:
Good Afternoon I have need of assistance for programming a visual basic form in excel. In excel I have 3 named ranges TM Agents1 Agents2 In the TM range I have 5 different names of...
2
by: sandipdeshmukh | last post by:
how to connect both MS Access and MS SQL database in one visual basic form
3
by: ChelseaVB | last post by:
Hi, I want to create a program enabling the user to enter their name, address (first line of address) and date of birth. Their details will then appear in 2 output boxes, their name and address...
4
Fane
by: Fane | last post by:
I have a label in program showing that the textbox's text is copied to clipboard. At the start it is not visible, but after the button is clicked, it becomes visible. After this I would want it to...
3
by: janita | last post by:
Hi i need to update a database which is connected to a form in visual basic. the entries that made in text boxes present in the form must be updated to the connected database. Can u help me with a...
2
by: subhala | last post by:
im getting an error when installing visual studio 6 in window xp.here is the error "set up is updating the system".then DCOM user account cannot register c:\program...
4
by: smcfadden | last post by:
Hello, I hope someone can tell me what I am doing wrong. I have two forms. The first one, which I later put into the other form as an unrelated subform is called UPCSubfrm. It’s record...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.