Getting The Location Of A Control Relative To The Entire Screen?

后端 未结 1 1593
难免孤独
难免孤独 2020-12-01 07:16

Let\'s say I have a Control and its location is relative to its parent. If its embedded many times and is the great great great grandchild of the main form, how can I deter

相关标签:
1条回答
  • 2020-12-01 07:51

    You're looking for the PointToScreen method:

    Point location = someControl.PointToScreen(Point.Empty);
    
    0 讨论(0)
提交回复
热议问题