domingo, 13 de noviembre de 2011

animacion de un componente

public partial class Form1 : Form{

{
InitializeComponent();
}


{
timer1.Enabled =
}

{
timer1.Enabled =
}

{

{
pictureBox1.Left++;

lr =
}
public Form1()bool lr = true, ud = true;private void Form1_MouseClick(object sender, MouseEventArgs e)true;private void Form1_MouseDoubleClick(object sender, MouseEventArgs e)false;private void timer1_Tick(object sender, EventArgs e)if (lr == true)if (pictureBox1.Left == this.ClientSize.Width - pictureBox1.Width+10)false;else{
pictureBox1.Left--;

lr =
}

{
pictureBox1.Top++;

ud =
}
if (pictureBox1.Left == -10)true;if (ud == true)if (pictureBox1.Top == this.ClientSize.Height - pictureBox1.Height+10)false;else{
pictureBox1.Top--;

ud =
}
}
if (pictureBox1.Top == -10)true;

No hay comentarios:

Publicar un comentario