Getting an image path using fromfile()

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

I am trying to make a slideshow program. This is my problem I cannot put the image inside the picture box.

Answers


Try to escape the '\':

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

Need Your Help

Finding nearest number between two lists

r list

I have a list of dataframes (df1) and another list of dataframes (df2) which hold values required to find the 'nearest value' in the first list.

How do I get the VM information presented in JConsole?

java debugging virtual-machine jconsole

Starting JConsole, selecing a process and then and heading over to VM Summary, one can see a lot of VM information, such as: