private void BouncingBallForm_MouseDown(object sender, MouseEventArgs e)
 {
     Random rannd = new Random();
     int dx = rannd.Next(-25, 25);
     int dy = rannd.Next(-25, 25);
     BBControl ball =new BBControl(e.X,e.Y,dx,dy);
     Controls.Add(ball);
 }
Esempio n. 2
0
        private void BouncingBallForm_MouseDown(object sender, MouseEventArgs e)
        {
            Random    rannd = new Random();
            int       dx    = rannd.Next(-25, 25);
            int       dy    = rannd.Next(-25, 25);
            BBControl ball  = new BBControl(e.X, e.Y, dx, dy);

            panel.Controls.Add(ball);
        }