Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 136,441 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 2,324 people online right now. Registration is fast and FREE... Join Now!




Coding margins top bottom

 
Reply to this topicStart new topic

Coding margins top bottom

hemo
24 Dec, 2007 - 08:06 AM
Post #1

New D.I.C Head
*

Joined: 2 Jan, 2007
Posts: 23



Thanked: 1 times
My Contributions
On my form, I have among other things, I have 4 textboxes and 3 buttons controls within a groupbox container. I can resize the form, groupbox and controls, but I can’t proportionally set the margin between the controls after resizing. Setting the margins in the property window don’t seem to work. Can anyone help please.
hemo

User is offlineProfile CardPM
+Quote Post

Martyr2
RE: Coding Margins Top Bottom
24 Dec, 2007 - 09:59 AM
Post #2

Programming Theoretician
Group Icon

Joined: 18 Apr, 2007
Posts: 5,209



Thanked: 214 times
Expert In: C/C++, Java, VB, VB.NET, C#, PHP, Web Development, HTML & CSS, Javascript

My Contributions
From what I remember you have to calculate these upon resizing in VB 6. This is usually done with a loop in the form resize event. If this is .NET you should be able to use anchoring to help maintain margins during a resize as well as use old VB 6 techniques to keep controls fitting together properly during resize.
User is online!Profile CardPM
+Quote Post

hemo
RE: Coding Margins Top Bottom
24 Dec, 2007 - 02:38 PM
Post #3

New D.I.C Head
*

Joined: 2 Jan, 2007
Posts: 23



Thanked: 1 times
My Contributions
QUOTE(Martyr2 @ 24 Dec, 2007 - 10:59 AM) *

From what I remember you have to calculate these upon resizing in VB 6. This is usually done with a loop in the form resize event. If this is .NET you should be able to use anchoring to help maintain margins during a resize as well as use old VB 6 techniques to keep controls fitting together properly during resize.


Sorry I did not make it clear I am using vb2008 express. I have tried both anchor and docking without success. I can resize the form, group box, texboxes and button. My problem is achieving the new spaces between the resizes textboxes. I thought margins would solve the problem, but can’t seem to find the appropriate code.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 02:09PM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month