南山狒狒

专注WinCE和GIS开发,提升ArcGIS和DirectShow,涉及过BizTalk,有Delphi经历
09年后的路,应该好好走了。

  博客园  :: 首页  ::  :: 联系 :: 订阅 订阅  :: 管理

首先声明下面代码只能用于桌面_NET,不适用于NETCF。

另外,内容很菜鸟,因为本人04年出道,自认仍然是菜鸟,老鸟略过。

控件写了不少,底层的上层的都有,但是一直都是只关注运行时效果,对新版设计时技术关注不多,习惯还停留于VS03的[CategoryAttribute("Behavior")]时代,今天花点时间写下,主要是给我同样的菜鸟们做做笔记。

不少源码都抄自MSDN,先坦白。。。

 

功能说明:只是一个相应鼠标操作的控件,设计时鼠标经过的时候,在控件上绘制一个带颜色的空心框。不同的只是设计时语法(VS05支持)。

Code
namespace ControlDesignerExample { // ExampleControlDesigner is an example control designer that // demonstrates basic functions of a ControlDesigner. [System.Security.Permissions.PermissionSet(System.Security.Permissions.SecurityAction.Demand, Name = "FullTrust")] public class ExampleControlDesigner : System.Windows.Forms.Design.ControlDesigner {
Code
} // This example control demonstrates the ExampleControlDesigner. [DesignerAttribute(typeof(ExampleControlDesigner))] public class ExampleControl : System.Windows.Forms.UserControl {
Code
} }
以上源码在VS08中以_NET2.0实现。
posted on 2009-02-02 14:58  Jrong  阅读(843)  评论(1编辑  收藏  举报