Animate picturebox c# winforms
public partial class myForm : Form
{
void myTimer_Tick(object sender, EventArgs e)
{
int x = myPictureBox.Location.X;
int y = myPictureBox1.Location.Y;
myPictureBox.Location = new Point(x+25, y);
if (x > this.Width)
myTimer.Stop();
}
public myForm()
{
InitializeComponent();
myTimer.Interval = 10;
myTimer.Tick += new EventHandler(myTimer_Tick);
}
private void myButton_Click(object sender, EventArgs e)
{
myPictureBox.Show();
myTimer.Start();
}