码迷,mamicode.com
首页 > 其他好文 > 详细

ControlDesigner

时间:2017-07-03 23:59:09      阅读:375      评论:0      收藏:0      [点我收藏+]

标签:sys   ase   cat   oca   ack   sdn   follow   sed   designer   

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

标签:sys   ase   cat   oca   ack   sdn   follow   sed   designer   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!