CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2008
    Posts
    66

    Get UserControl Position

    Hi all!

    In my app, the user can drag and drop some usercontrols. Now, I am coding a XML file which the user can save his preferences, so it is necessary to get the position which the usercontrols are displayed.

    How can i get the x and y positions value of these controls?

    Thank you in advance.

  2. #2
    Join Date
    Mar 2004
    Location
    Prague, Czech Republic, EU
    Posts
    1,701

    Re: Get UserControl Position

    There is a Location property in the UserControl class. It returns the coordinates of the control inside the area of its container.
    • Make it run.
    • Make it right.
    • Make it fast.

    Don't hesitate to rate my post.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured