namespace WindowsFormsApplication7
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void radioButton1_CheckedChanged(object sender, EventArgs e)
{
}
private void timer1_Tick(object sender, EventArgs e)
{
if (radioButton1.Left < 101) //让球自动向右运动
radioButton1.Left++;
else if (radioButton1.Top > 158)//设置临界点让球的运动发生变化
radioButton1.Top--;
else if (radioButton1.Left < 189)
radioButton1.Left++;
else if (radioButton1.Top < 191)
radioButton1.Top++;
else if (radioButton1.Left < 264)
radioButton1.Left++;
}
}
}
-----------------------华丽的分割线------------------------------------------
我这个编程就是让radioButton像一颗球一样沿着Button1、2、3的表面滑动。。。
问题就是我的”球“滑倒一半就不能动了。。
好像是下面这部分的代码都没用到。。。
else if (radioButton1.Top < 191)
radioButton1.Top++;
else if (radioButton1.Left < 264)
radioButton1.Left++;