来回移动窗体(图片),图片在桌面上来回漂浮 public partial class Form1 : Form
{
private string imgurlLeft = @"../../Picture/runleft.gif";
private string imgurlRight = @"../../Picture/runright.gif";
private string imgurlUp = @"../../Picture/runup.gif";
private string imgurlDown = @"../../Picture/runDown.gif";
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
FormMove fm1 = new FormMove(imgurlLeft, Direction.LEFT);
FormMove fm2 = new FormMove(imgurlRight, Direction.RIGHT);
FormMove fm3 = new FormMove(imgurlUp, Direction.UP);
FormMove fm4 = new FormMove(imgurlDown, Direction.DOWN);
Picture p1 = fm1.picture;
p1.Show();
Picture p2 = fm2.picture;
p2.Show();
Picture p3 = fm3.picture;
p3.Show();
Picture p4 = fm4.picture;
p4.Show();
}
评论