首页 > 其他 > 详细

ControlDesigner

时间:2017-07-03 23:02:52      阅读:269      评论:0      收藏:0      [点我收藏+]

https://stackoverflow.com/questions/7762397/how-do-i-click-a-usercontrols-child-in-designer

 

@Bradley: thanks for pointing me in the right direction

You will need to write a ControlDesigner class, then use it in a [Designer( ... )] attribute on your UserControl.

See the example here: http://msdn.microsoft.com/en-us/library/sycctd1z(v=VS.90).aspx

For the actual click:

http://msdn.microsoft.com/en-us/library/system.windows.forms.design.controldesigner.gethittest(v=VS.90).aspx

The ControlDesigner has a protected bool GetHitTest(Point point) method - you can implement this in your ControlDesigner and return true when you want your control to handle a click, based on the click‘s location on the screen.

 

 

 

 

相关资料

http://www.cnblogs.com/blueglass/archive/2012/06/01/2530030.html

ControlDesigner

原文:http://www.cnblogs.com/chucklu/p/7113309.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!