hi all,
i want to write a c# code that display the picture of user's windows account in picturebox, so if any one know how do you call and display the user's picture in a picturebox using c#
I try the following code but nothing happened:

private void button1_Click(object sender, EventArgs e)
Image myimage = GetUserImage();
pictureBox1.Image = myimage;

private Image GetUserImage()
string TempPath = Environment.GetEnvironmentVariable("TEMP");
string UserName = Environment.GetEnvironmentVariable("USERNAME");
string ImagePath = String.Format("{0}\\{1}.bmp", TempPath, UserName);
if (System.IO.File.Exists(ImagePath))
MessageBox.Show("there is an image");
return Image.FromFile(String.Format("{0}\\{1}.bmp", TempPath, UserName));

return null;


if any one has any idea, please tell me soon.
thank you very much