2.程式碼:
--------------------------------------------------------------------------------
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 ch5_1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
IbShow.Text = "";
}
private void btnOK_Click(object sender, EventArgs e)//OK按下
{
IbShow.Text = "Hello " + txtName.Text;
IbShow.BackColor = Color.Yellow;
}
private void btnExit_Click(object sender, EventArgs e)
{
Application.Exit();//結束視窗
}
}
}
----------------------------------------------------------------------------
沒有留言:
張貼留言