A
AndyNakamura
Guest
I have a database application that can open various files - .jpg .pdf .tif etc
The actual files are stored on the hard drive with just links to them stored in the db.
The links are displayed in a DataGridView. Clicking the link opens the file.
Because I don't want anyone to try to do a 'save as' for instance I'm copying the file to mydocuments\MyTempDir and changing the filename to eg temp1.tif,
I'm using process.start("temp1.tif") to open the file with the default program.(In my case Photo Gallery)
If the user clicks on another link then the filename will be incremented to temp2.tif and another instance is opened.
If the user closes the main program, then the two photo gallery instances are still there.
I'd like to automatically close these when the main app exits.
If I do process.kill in the form.closing event of the main app then the tif image disappears from the photo gallery instance but the instance itself is not closed.
Anyone know how I can achieve this?
Cheers
Andy
Continue reading...
The actual files are stored on the hard drive with just links to them stored in the db.
The links are displayed in a DataGridView. Clicking the link opens the file.
Because I don't want anyone to try to do a 'save as' for instance I'm copying the file to mydocuments\MyTempDir and changing the filename to eg temp1.tif,
I'm using process.start("temp1.tif") to open the file with the default program.(In my case Photo Gallery)
If the user clicks on another link then the filename will be incremented to temp2.tif and another instance is opened.
If the user closes the main program, then the two photo gallery instances are still there.
I'd like to automatically close these when the main app exits.
If I do process.kill in the form.closing event of the main app then the tif image disappears from the photo gallery instance but the instance itself is not closed.
Anyone know how I can achieve this?
Cheers
Andy
Continue reading...