Load image from file location

djcritter

New member
Local time
Today, 07:44
Joined
Jan 19, 2006
Messages
6
I've got the location of an image in a text box on a form and i have the image showing on the form in a image box but i want it to act like an OLE object so that when the image is double clicked it opens the image in photo editor.

I can get photo edit to load but can't get the image to open. This is the code i'm using so far.

Private Sub PHOTO1VIEW_DblClick(Cancel As Integer)
Dim RetVal
RetVal = Shell("C:\Program Files\PhotoEd\PHOTOED.exe me.photo1path", 1)
End Sub

Can someone please help!!
 
RetVal = Shell("C:\Program Files\PhotoEd\PHOTOED.exe me.photo1path", 1)

Try

RetVal = Shell("C:\Program Files\PhotoEd\PHOTOED.exe\me.photo1path", 1)

I am not sure if this will work or not.

Alastair
 
That change did not work but thanks any way. I've changed the code a bit here it is now.

Private Sub PHOTO1VIEW_DblClick(Cancel As Integer)
Dim RetVal
Dim PathToFile As String
PathToFile = Me.PHOTO1Path
RetVal = Shell("C:\Program Files\PhotoEd\PHOTOED.exe pathtofile", 1)
End Sub
 

Users who are viewing this thread

Back
Top Bottom