using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_MouseMove(object sender, MouseEventArgs e)
{
if (button1.Left == 0)
{
button1.Top = button1.Top + 50;
button1.Left = 0;
}
if (button1.Top == 500)
{
button1.Left = button1.Left+50;
button1.Top = button1.Top=500;
}
if (button1.Left == 500)
{
button1.Left = button1.Left=500;
button1.Top = button1.Top-50;
}
if (button1.Top == 0)
{
button1.Top = button1.Top=0;
button1.Left = button1.Left -50;
}
}
}
}
0 yorum:
Yorum Gönder