窗体的可视继承.txt
来自「C# 是创新性的新式编程语言」· 文本 代码 · 共 29 行
TXT
29 行
设计继承而来窗口,把基类修改为默认的System.Windows.Forms.Form
生成工程是,修改为原来基类。
可以通过宏来简化修改基类。
// #define FORM_DESIGN
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace FormsCollection
{
/// <summary>
/// Summary description for FormPrecipitation.
/// </summary>
#if (FORM_DESIGN)
public class FormPrecipitation : System.Windows.Forms.Form
#else
public class FormPrecipitation : WeatherGage.FormGage
#endif
{
public FormPrecipitation()
{
但是基类的菜单、与工具栏不会被继承的
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?