美文网首页
c#第一次作业要求

c#第一次作业要求

作者: 鲸落_79f1 | 来源:发表于2018-10-18 09:42 被阅读0次

作业要求

点击【显示】按钮,在标签空间中显示【hello world]

代码

namespace hello__world
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

    private void Form1_Load(object sender, EventArgs e)
    {
        
    }

    private void textBox1_TextChanged(object sender, EventArgs e)
    {

    }

    private void button1_Click(object sender, EventArgs e)
    {
        textBox1.Text = "hello world";//在文本框中显示"hello world"
    }

    private void button2_Click(object sender, EventArgs e)
    {
        textBox1.Text = "";//将文本框内显示的内容清空
    }

    private void button3_Click(object sender, EventArgs e)
    {
        MessageBox.Show("hello world");//弹出一个新的对话框,显示"hello world"
    }
}

}

效果

c#第一次作业要求

相关文章

网友评论

      本文标题:c#第一次作业要求

      本文链接:https://www.haomeiwen.com/subject/vlqjzftx.html