' Visual Basic Private Sub LoadNewPict() ' You should replace the bold image ' in the sample below with an icon of your own choosing. PictureBox1.Image = Image.FromFile _ (System.Environment.GetFolderPath _ (System.Environment.SpecialFolder.Personal) _ & "\Image.gif") End Sub
// C# private void LoadNewPict(){ // You should replace the bold image // in the sample below with an icon of your own choosing. // Note the escape character used (@) when specifying the path. pictureBox1.Image = Image.FromFile (System.Environment.GetFolderPath (System.Environment.SpecialFolder.Personal) + @"\Image.gif"); }
// C++ private: void LoadNewPict() { // You should replace the bold image // in the sample below with an icon of your own choosing. pictureBox1->Image = Image::FromFile(String::Concat( System::Environment::GetFolderPath( System::Environment::SpecialFolder::Personal), "\\Image.gif")); } Yn²M°£¹Ï§Î