private void pictureBox5_Click(object sender, EventArgs e) { PictureBox p = (PictureBox)sender; pen.Color = p.BackColor; }