Wim BR

Wim BR

  • NA
  • 14
  • 1.4k

how can i put these into methods ?

Jun 1 2020 1:49 PM
hey 
 
how can i put code under into nessencairy methods ?
 
private void btnUp_Click(object sender, EventArgs e)
{
pbxPicture.Top -=10;
}
private void btnDown_Click(object sender, EventArgs e)
{
pbxPicture.Top += 10;
}
private void btnLeft_Click(object sender, EventArgs e)
{
pbxPicture.Left -= 10;
}
private void btnRight_Click(object sender, EventArgs e)
{
pbxPicture.Left += 10;
}
private void btnUpLeft_Click(object sender, EventArgs e)
{
pbxPicture.Left -= 10;
pbxPicture.Top -= 10;
}
private void btnUpRight_Click(object sender, EventArgs e)
{
pbxPicture.Left += 10;
pbxPicture.Top -= 10;
}
private void btnDownLeft_Click(object sender, EventArgs e)
{
pbxPicture.Left -= 10;
pbxPicture.Top += 10;
}
private void btnDownRight_Click(object sender, EventArgs e)
{
pbxPicture.Left += 10;
pbxPicture.Top += 10;
}
}
}
thx 
Wimo 

Answers (4)