|
-
Oct 4th, 2010, 02:37 PM
#1
Thread Starter
New Member
opening Windows PhotoGallery with shell command problem
Hello
I do not know what is happening. Even though Windows PhotoGallery gets open
with the next statements, it does not open the picture I want. However if I
try to replace the string C:\Program Files\Windows Photo Gallery\WindowsPhotoGallery.exe with C:\Windows\System32\mspaint.exe, then Paint will open the picture.
Why is Windows PhotoGallery not opening the picture as I expect? Instead, it just gets opened but without no picture in big size.
Dim sPaint As String
Dim sPicture As String
sPaint = "C:\Program Files\Windows Photo Gallery\WindowsPhotoGallery.exe"
sPicture = "C:\Users\Fujitsu\Desktop\DSCN7408.JPG"
Dim command As String
command = """" & sPaint & """ """ & sPicture & """"
Shell command, vbNormalFocus
Thanks
< advertising removed by moderator >
-
Oct 5th, 2010, 04:19 AM
#2
Re: opening Windows PhotoGallery with shell command problem
as windowsphotogallery.exe appears to be specific to vista only i am unable to test on XP or W7
if that is the default program to open jpg files, try using shellexecute, search the forum for examples
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|