Try something like this:
Random rnd = new Random( );
private void button1_Click( object sender, EventArgs e )
{
string folder = @"D:\MyImages";
string[] files = Directory.GetFiles( folder );
pictureBox1.ImageLocation = files[rnd.Next( files.Length )];
}
Rnd is a member of your form class, folder is the directory that contains images only.