13、Windows Forms 编程详解

Windows Forms 编程详解

1. Windows Forms 基础

Windows 窗体基于 Form 类,确切地说是 System.Windows.Forms.Form 类。该类继承自 System.Windows.Forms.ContainerControl 类,而 ContainerControl 类又继承自 System.Windows.Forms.ScrollableControl 类,其继承层次如下:

graph LR
    A[System.Object] --> B[System.MarshalByRefObject]
    B --> C[System.ComponentModel.Component]
    C --> D[System.Windows.Forms.Control]
    D --> E[System.Windows.Forms.ScrollableControl]
    E --> F[System.Windows.Forms.ContainerControl]
    F --> G[System.Windows.Forms.Form]

每个类都继承了其前身的功能。有趣的是,窗体实际上是经过修改的控件,它和其他控件(如按钮或文本框)一样基于 Control 类。这意味着你可以对窗体执行与控件相同的操作,例如窗体也有

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值