[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 164
  • Last Modified:

how to get control count and location on a form

I have a vb6 program that I create controls on at runtime and move the controls around. When I'm done I'd like to click a button on the form that will count the controls and tell me the locations of each control(x,y coordinates) in inches if possible.

Thank you,

Matt
0
heydude
Asked:
heydude
1 Solution
 
Ryan ChongCommented:
maybe can try like this..

Dim ctrl As Control
    For Each ctrl In Me.Controls
        Debug.Print ctrl.Name & " (" & ctrl.Left & ", " & ctrl.Top & ") "
    Next
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now