1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
private void ZoneSouris_MouseDown(object sender,
System.Windows.Forms.MouseEventArgs e)
{
int X_local=0, Y_local=0,num_case=0, cpt=0, ligne=0, col=0, j=0;
X_local=X;
Y_local=Y;
while ((X_local%70)!=0)X_local++;
X_local=X_local/70;
while ((Y_local%70)!=0)Y_local++;
Y_local=Y_local/70;
num_case=X_local+(7*(Y_local-1));
j=local_posi(num_case);
while (j>7)
{
j=j-7;
cpt++;
}
ligne=((cpt+1)*70)-35; //---X : -35 pour trouver le centre---//
col=(j*70)-35; //---Y : -35 pour trouver le centre---//
}
public void DrawEllipseFloat(PaintEventArgs e)
{
// Create pen.
Pen blackPen = new Pen(Color.Black, 3);
// Create location and size of ellipse.
float x = 200.0F;
float y = 500.0F;
float width = 200.0F;
float height = 100.0F;
// Draw ellipse to screen.
e.Graphics.DrawEllipse(blackPen, x, y, width, height);
} |
Partager