问题
I have a project with SQlite database . I save images in folder " pics " ( into debug folder) & their name in the database ( column "docpic") . When I click in a row , related image retrieve the image from database to picturebox1 . i want open the image ( in picturebox1 ) by windows photo viewer by clicking on picturebox1 . how can do this ?
i use this codes in picturebox1 click event but thats not work :
if (pictureBox1.Tag != null)
{
System.Diagnostics.Process imageViewerProcess = new System.Diagnostics.Process();
imageViewerProcess.StartInfo.CreateNoWindow = false;
imageViewerProcess.StartInfo.FileName = "rundll32.exe";
imageViewerProcess.StartInfo.Arguments =
@"C:\WINDOWS\System32\shimgvw.dll,ImageView_Fullscreen "
+ pictureBox1.Tag.ToString();
imageViewerProcess.Start();
}
}
来源:https://stackoverflow.com/questions/42676443/open-the-image-in-windows-photo-viewer-by-clicking-on-picturebox1-c-sharp