I have an app that reads a file with tabular data, and containing names of 2 images relating to the data (RGB and CIR)
I display the RGB in a Windows form app, using the following so the user see textual data and the RGB image
SnippetDisplayOut.Image = Image.FromFile(RGB_Snippetname, True)
Then I display a second image on a separate screen so the user can compare the RGB and CIR images Using the following. It passes the complete image name to the default application associated with the file extension.
Try
Dim myProcess As Process = Process.Start(CIR_Snippetname)
Catch ex As Exception
MsgBox(CIR_Snippetname & " Not Found")
End Try
The user then categorizes the image and the program displays the next RGB image and CIR image.
This works, but is a bit klugdy - I have not figured how to terminate the CIR image display, so the user has to manually terminate the group after too many pile up.
In addition, it would be nice to be able to direct the CIR image display to a screen separate from the windows forms display.
I have tried adding the MyHandle = myProcess.Handle as follows but this displays the CIR image and then says it cannot find the image
Dim myProcess As Process = Process.Start(CIR_Snippetname) MyHandle = myProcess.Handle
and when I tried to use the following to close the image, I get a process not found error.
Try Dim myProcess As Process = Process.GetProcessById(MyHandle) myProcess.Close() Catch ex As Exception MsgBox("Process Not Found") End Try