1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
public point cursOn;//qui prend lemplacement de la souris à l'instant du click
private void timer1_Tick(object sender, EventArgs e)
{
Point point = PointToClient(MousePosition);
Point Final = new Point();
Final.X= point.X - _cursOn.X;
if (point.X - _cursOn.X < 0)
Final.X = 0;
Final.Y = point.Y - _cursOn.Y;
if (point.Y - _cursOn.Y < 0)
Final.Y = 0;
Bitmap bmp = new Bitmap("x.bmp");
Graphics X = Graphics.FromImage(bmp);
X.DrawImage(bmp, Final);
listsymb.Refresh();
} |
Partager