Exemple #1
0
        private void Preparacion()
        {
            Identificador = 0;
            Pos           = 1;
            Y             = 0;
            Semilla       = Environment.TickCount;
            Procesos.Clear();
            Lista.Clear();
            Terminados.Clear();
            TablaPocisiones.Rows.Clear();
            TablaPocisiones.Refresh();
            Picture = global::Actividad_1_FCFS.Properties.Resources.Pasto;
            TablaPocisiones.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
            Rectangle Dimensiones = new Rectangle(0, 0, Picture.Width, Picture.Height);

            System.Drawing.Imaging.PixelFormat Formato = Picture.PixelFormat;
            Animacion = Picture.Clone(Dimensiones, Formato);
            Animacion.MakeTransparent();
            pictureBox1.Image                 = Animacion;
            pictureBox1.BackgroundImage       = Picture;
            pictureBox1.BackgroundImageLayout = ImageLayout.Stretch;
            Graphics Grafico = Graphics.FromImage(Animacion);

            Grafico.DrawImage(Caballo, 10, 0);
            Grafico.DrawImage(Caballo, 10, 100);
            Grafico.DrawImage(Caballo, 10, 200);
            Grafico.DrawImage(Caballo, 10, 300);
            Grafico.DrawImage(Caballo, 10, 400);
            pictureBox1.Refresh();
        }