close

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
int c;
int d = 1;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
}
private void button2_Click(object sender, EventArgs e)
{
button1.Left = 100*c;
if(button1.Left>460)
{
d = -1;
}
if (button1.Left < 0)
{
d = 1;
}
c = c + d;
}
}
}

arrow
arrow
    全站熱搜

    henry2004z 發表在 痞客邦 留言(0) 人氣()