惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

爱范儿
爱范儿
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
G
GRAHAM CLULEY
www.infosecurity-magazine.com
www.infosecurity-magazine.com
V2EX - 技术
V2EX - 技术
The Last Watchdog
The Last Watchdog
S
Secure Thoughts
Webroot Blog
Webroot Blog
PCI Perspectives
PCI Perspectives
L
LINUX DO - 最新话题
Hacker News: Ask HN
Hacker News: Ask HN
N
News and Events Feed by Topic
H
Heimdal Security Blog
H
Help Net Security
T
The Blog of Author Tim Ferriss
P
Proofpoint News Feed
The GitHub Blog
The GitHub Blog
Jina AI
Jina AI
Recent Commits to openclaw:main
Recent Commits to openclaw:main
F
Full Disclosure
小众软件
小众软件
S
Securelist
罗磊的独立博客
NISL@THU
NISL@THU
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Cisco Blogs
云风的 BLOG
云风的 BLOG
C
CERT Recently Published Vulnerability Notes
Cisco Talos Blog
Cisco Talos Blog
Know Your Adversary
Know Your Adversary
S
Schneier on Security
D
DataBreaches.Net
M
MIT News - Artificial intelligence
V
Vulnerabilities – Threatpost
N
News and Events Feed by Topic
有赞技术团队
有赞技术团队
F
Fortinet All Blogs
T
Tenable Blog
The Register - Security
The Register - Security
C
Check Point Blog
AWS News Blog
AWS News Blog
Cloudbric
Cloudbric
C
CXSECURITY Database RSS Feed - CXSecurity.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
C
Cyber Attacks, Cyber Crime and Cyber Security
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google Online Security Blog
Google Online Security Blog
博客园 - 叶小钗
Hacker News - Newest:
Hacker News - Newest: "LLM"
博客园 - 司徒正美

博客园 - dn

[2008年]毕业论文格式要求 《面向.NET的XML程序设计》MAC模拟题 《基于C#的Windows应用程序设计》MCP认证考试模拟题 第六章课后习题及答案 第五章课后习题及答案 第四章课后习题及答案 毕业设计论文封面模板 在C#程序设计中使用Win32 API .NET中常用的连接字符串 第三章课后习题和答案 第三章例题:文件许可 第三章例题:重载控件属性 第三章例题:自定义控件 毕业论文格式 第二章课后习题及答案 第二章例题:验证处理 第二章例题:动态添加控件 [2007年]毕业设计:bluehill人事管理系统 快速导航
第三章例题:为控件添加设计时支持
dn · 2007-04-15 · via 博客园 - dn

第三章例题:为控件添加设计时支持

对教材3.3部分进行演示

 1[ToolboxBitmap(@"E:\教学\基于C#的Windows应用程序设计\第三章\test_cra\App.ico")]
 2public class UserControl1 : System.Windows.Forms.UserControl
 3{
 4    private System.Windows.Forms.Button button1;
 5    private System.Windows.Forms.Button button2;
 6    /// <summary>
 7    /// 必需的设计器变量。
 8    /// </summary>

 9    private System.ComponentModel.Container components = null;
10
11    public UserControl1()
12    {
13        // 该调用是 Windows.Forms 窗体设计器所必需的。
14        InitializeComponent();
15
16        // TODO: 在 InitComponent 调用后添加任何初始化
17
18    }

19
20    /// <summary>
21    /// 清理所有正在使用的资源。
22    /// </summary>

23    protected override void Dispose( bool disposing )
24    {
25        if( disposing )
26        {
27            if( components != null )
28                components.Dispose();
29        }

30        base.Dispose( disposing );
31    }

32
33    [Browsable(true),Description("自定义的属性描述"),Category("自定义的分类")]
34    public Color Button1Color
35    {
36        set
37        {
38            button1.BackColor = value;
39        }

40        get
41        {
42            return button1.BackColor;
43        }

44    }

45}

完整源代码下载:control_runtime_attribute.rar

posted @ 2007-04-15 15:46  dn  阅读(222)  评论(0)    收藏  举报

刷新页面返回顶部