为何Form1.Text没有这个属性
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsTest
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Click(object sender, EventArgs e)
{
MessageBox.Show("这是窗体单击事件","窗体事件");
}
private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show("这是按键单击事件", "按键事件");
}
private void button2_Click(object sender, EventArgs e)
{
this.Text = "打印窗体";
}
private void button3_Click(object sender, EventArgs e)
{
//Form1.Text = "窗体标题被改动";
}
}
}
我改成this.Text = "窗体标题被改动";后就能正常执行。请问这是什么基本道理?