joe_pool_is
Contributor
Looking at the VS 2005 Express example for C++ "How to Modify the Size of Placement of a Picture at Run Time":
private:
void StretchPic()
{
// Stretch the picture to fit the control.
pictureBox1->SizeMode = PictureBoxSizeMode::StretchImage;
// Load the picture into the control.
// 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:ersonal),
"\\Image.gif"));
}
Does not work. I can find the image ok, but the filename starts with "C:\Documents and ..." but the compiler breaks at the "C" (first letter).
Any idea why this example doesn't work?
private:
void StretchPic()
{
// Stretch the picture to fit the control.
pictureBox1->SizeMode = PictureBoxSizeMode::StretchImage;
// Load the picture into the control.
// 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:ersonal),
"\\Image.gif"));
}
Does not work. I can find the image ok, but the filename starts with "C:\Documents and ..." but the compiler breaks at the "C" (first letter).
Any idea why this example doesn't work?