close
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 各式作業
{
public partial class Form1 : Form
{
int c,r;
public Form1()
{
InitializeComponent();
c = 0;
}
private void button1_Click(object sender, EventArgs e)
{
c = c + 1;
r = c % 2;
if (r == 0) {
button2.Location = new Point(0, 0);
}
else if (r == 1) {
button2.Location = new Point(0,100);
}
label1.Text = r.ToString();
}
}
}
全站熱搜
留言列表