|
security
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
dynamically reposition controls on a formIs there a way to know the positioning coordinates of a control on a form?
I need a routine that will for example "move all controls on the form 1 inch to the right". The code below would work if I had the value for the variable oldPositionX, but I cannot figure out how to know this dynamically. Thanks very much. Dim ctl As Control, cnt As Integer For Each ctl In Forms(formName).Controls ctl.Move oldPositionX + 1440 Jay Jay wrote:
> Is there a way to know the positioning coordinates of a control on a form? You're so close! You just need to give the control's Left property for its> I need a routine that will for example "move all controls on the form 1 inch > to the right". > The code below would work if I had the value for the variable oldPositionX, > but I cannot figure out how to know this dynamically. current horizontal position, and the control's Top property for its vertical position (in case you need that in the future). Try it like this: Dim ctl As Control Const INCH As Long = 1440 For Each ctl In Forms(formName).Controls ctl.Move ctl.Left + INCH Next ctl Set ctl = Nothing -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-security/200609/1 |
|||||||||||||||||||||||