New
#1
C# opens a image in Windows 10 but NOT able to navigate to next image
Hi All,
Could you please help
My Environment: Windows 10 Operating system in Desktop machine
My purpose: I have a "Sample_Pictures" folder in "My Documents" folder, this "Sample_Pictures" folder contains 5 pictures. I need to open an image (using C# console application) and then navigate to Next and Previous image in "Sample_Pictures" folder
Issue I am facing: I am able to open an image, but NOT able to navigate to Next and Previous pictures in folder. Both Next and Previous buttons are disabled. I mean the Next and Previous buttons present in image is NOT working in Windows 10 Photos. However If I open the same image separately in Windows Explorer, I am able to navigate to Next and Previous image.
Sample Program:
static void Main(string[] args)
{
OpenSamplePhoto();
}
private static void OpenSamplePhoto()
{
string samplePicturesPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "Sample_Pictures");
string picturePath = Path.Combine(samplePicturesPath,"sample1.JPG");
ProcessStartInfo info = new ProcessStartInfo();
info.FileName = picturePath;
info.UseShellExecute = true;
info.CreateNoWindow = true;
info.Verb = string.Empty; Process.Start(info);
}
Last edited by Obuliraj; 13 Dec 2016 at 15:06. Reason: Text formatting