473,516 Members | 3,064 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Move controls when form maximized

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 the form will expand
all around it, how can I make my controls stay, say in the bottom right
corner no matter the size of the form and the resolution of the monitor?

Thanks

Jacob Thastrup

Nov 21 '05 #1
3 4479
Take a look at the Anchor property of the controls. This will allow you to
'anchor' your controls in a particular position on the form. If you set the
Anchor property to Top, your control will be anchored to the top of the form
no matter the size of the form. Similarly, if you set the property to Bottom
Or Left (since these are bit flags), the control will be anchored to the
bottom left of the form. Based on your requirements, a particular
combination of the flags should work for you.

hope that helps..
Imran.
"Jacob Thastrup" <ja***@thastrup.com> wrote in message
news:41***************@thastrup.com...
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 the form will expand
all around it, how can I make my controls stay, say in the bottom right
corner no matter the size of the form and the resolution of the monitor?

Thanks

Jacob Thastrup

Nov 21 '05 #2
Works like a charm

Thanks

Imran Koradia wrote:
Take a look at the Anchor property of the controls. This will allow you to
'anchor' your controls in a particular position on the form. If you set the
Anchor property to Top, your control will be anchored to the top of the form
no matter the size of the form. Similarly, if you set the property to Bottom
Or Left (since these are bit flags), the control will be anchored to the
bottom left of the form. Based on your requirements, a particular
combination of the flags should work for you.

hope that helps..
Imran.

"Jacob Thastrup" <ja***@thastrup.com> wrote in message
news:41***************@thastrup.com...
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 the form will expand
all around it, how can I make my controls stay, say in the bottom right
corner no matter the size of the form and the resolution of the monitor?

Thanks

Jacob Thastrup


Nov 21 '05 #3
"Jacob Thastrup" <ja***@thastrup.com> schrieb:
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 the form will expand
all around it, how can I make my controls stay, say in the bottom right
corner no matter the size of the form and the resolution of the monitor?


Take a look at the controls' 'Anchor' and 'Dock' properties, and the form's
'Scale' property. If you are looking for implementations of layout managers
like in Java, have a look here:

Simple Layout Managers
<URL:http://www.dotnet.jku.at/projects/slm/>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #4

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

Similar topics

5
18308
by: Eric Kiernan | last post by:
I have a form that I previously created and put a number of text box controls on. Everything previously worked. Now when I enter the form ( in design mode ), I can't move any of the controls to other positions with my mouse. This is also true of any controls that i add to the form. If i add a new control, it also can't be moved. I notice...
3
9902
by: deko | last post by:
Very basic question: Should I use Me.Controls or Me.Form.Controls when looping through controls like this: Private Sub LockControls(blnLock As Boolean) Dim varCtl As Variant Me!cboData.SetFocus Me!cmdStop.Visible = blnLock
1
2115
by: David Sagenaut | last post by:
In 2003 VS.NET, I can drag a label control to design view, then I can move the label control around. But in 2005 VS.NET, I cannot move the label control around in design view after I drag a label control from toolbox. What kind of setting I need to in order to move controls around in design view? Thanks in advance! David
4
1719
by: Montaque [MVP] | last post by:
In VS.NET 2003, we can use CTL+ArrowKey to Move controls placed in the form or CTL+SHIFT+ArrowKey to adjust the size of controls. And the minimun step is one pixel, it is very terrible if you wanna change the position of a control a lot. i.e from the left corner to the bottom:) So is there any way to set the step of moving or adjusting , Say, 4...
14
4005
by: Jan Nielsen | last post by:
Hi In Microsoft Access it is possible to write code like this Sub test() DoCmd.OpenForm "TestForm", acDesign Dim a As Control For Each a In Forms("TestForm").Controls Do stuff Next End Sub
3
1712
by: Sridhar Panatula | last post by:
Hi I am using Vs.nET 2003 precisely Version 7.1.3088 Framework version 1.1.4322 SP1 Suddenly VS.NET refuses to move controls to the location I want.
0
1270
by: =?Utf-8?B?QWxleCBLLg==?= | last post by:
Hi all I am using form's ResizeEnd event to adjust some GUI staff on my form. But when user maximizes the form, this event is not fired. Theoretically, I could use Resize or SizeChanged events to catch when form is maximized (or normalized from maximized state) but then I loose all advantages provided by ResizeEnd because those two events...
0
2504
by: Paul | last post by:
Hi, I am looking to create an eLearning resource using VB2008. I have a form with a background picture of a cross section of a strand of hair magnified x1000. The around the edge of the hair strand there are empty boxes. The boxes are part of the background image (jpg). The user drags a command button, labelled, for example, 'Hair...
2
5245
ammoos
by: ammoos | last post by:
Hi friends I couldnt move controls in a user form(ms excel) using keyboard but I can move it by mouse.. I couldnt understand whats the issue.. now I reinstalled ms office 2003 on my machine, before that there were no such issues.. pls help me.. Thanks Ammooss
0
7276
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7182
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7142
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5714
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5110
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4773
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3267
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3259
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
488
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.