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 3 4484
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******** *******@thastru p.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
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******** *******@thastru p.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
"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/> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 that when i hightlite the
control(s) with the mouse, the little boxes in the line surrounding the...
|
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
|
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
|
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 pixel or another settign.
--
Best regards,
Yongfeng Hou
Microsoft .NET MVP
Shanghai, China
|
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
| |
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.
|
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 are fired way to
often ...
Is there other way to add kind of "Maximize" / "Normalize" events...
|
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
Follicle' over to an empty box and drops 'within'. This process is
repeated for the remaining...
|
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
|
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |