日期:2014-05-18 浏览次数:21432 次
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace MoveForm
{
    public partial class frmMoveForm : Form
    {
        public frmMoveForm()
        {
            InitializeComponent();
        }
        private void btnLeft_Click(object sender, EventArgs e)
        {
            this.Left = this.Left - 2;
           
        }
        private void btnRight_Click(object sender, EventArgs e)
        {
            this.Left= this.Left + 2;
        }
    }
}
Location = new Point(Location.X + 2, Location.Y);