PROGRAMMER
Seçkin Üye
C#:
private int magicalcoder_y = 0;
private int magicalcoder_x = 0;
private bool magicalcoder = false;
Forum MouseDown Kısmına yapıştıracal kodlar.
{
this.magicalcoder = true;
this.magicalcoder_x = System.Windows.Forms.Cursor.Position.X - Convert.ToInt32(base.Left);
this.magicalcoder_y = System.Windows.Forms.Cursor.Position.Y - Convert.ToInt32(base.Top);
}
Forum MouseUp Kısmına yapıştıracal kodlar.
{
this.magicalcoder = false;
}
Forum MouseMove Kısmına yapıştıracal kodlar.
{
bool magicalcoder1 = this.magicalcoder;
if (magicalcoder1)
{
base.Left = (double)(System.Windows.Forms.Cursor.Position.X - this.magicalcoder_x);
base.Top = (double)(System.Windows.Forms.Cursor.Position.Y - this.magicalcoder_y);
}
}