找传奇、传世资源到传世资源站!

C# 窗体随机移动

8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

来回移动窗体(图片),图片在桌面上来回漂浮from clipboard from clipboard 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();

        }

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复