使用fromfile()获取图像路径

时间:2014-03-07 07:47:18

标签: bitmap c++-cli fromfile

String^ path = "C:\Users\Abu Bakr\Pictures\Photoshop\Thumbnail for zactonia.png";
        Picture->Image = System::Drawing::Image::FromFile(path);

我正在尝试制作幻灯片程序。这是我的问题我无法将图像放在图片框内。

1 个答案:

答案 0 :(得分:0)

尝试逃避'\':

String^ path = "C:\\Users\\Abu Bakr\\Pictures\Photoshop\\Thumbnail for zactonia.png";
        Picture->Image = System::Drawing::Image::FromFile(path);