Avviare il Visualizzatore immagini e fax per Windows

Il Visualizzatore immagini e fax per Windows non è un’eseguibile bensì una funzionalità contenuta nella dll shimgvw.dll.
Infatti se tramite Opzioni Cartella andiamo a vedere quale applicazione viene aperta quando in espora risorse facciamo doppio click su un file immagine notiamo che viene utilizzata la seguente:
rundll32.exe C:\WINDOWS\System32\shimgvw.dll,ImageView_Fullscreen %1

Quindi possimao scrivere un codice di questo tipo per aprire un’immagine tramite il Visualizzatore:

Dim p As New System.Diagnostics.Process
p.StartInfo.FileName = “rundll32.exe”
p.StartInfo.Arguments = System.IO.Path.Combine(System.Environment.SystemDirectory, “shimgvw.dll”)
p.StartInfo.Arguments &= “,ImageView_Fullscreen”
p.StartInfo.Arguments &= ” E:\MyImg.gif”
p.StartInfo.UseShellExecute = False
p.StartInfo.Verb = “open”
p.Start()

Analogamente è possibile stampare su una stampate a scelta:

Dim p As New System.Diagnostics.Process
p.StartInfo.FileName = “rundll32.exe”
p1.StartInfo.Arguments = System.IO.Path.Combine(System.Environment.SystemDirectory, “shimgvw.dll”)
p.StartInfo.Arguments &= “,ImageView_PrintTo /pt”
p.StartInfo.Arguments &= ” “”E:\MyImg.gif”””
p.StartInfo.Arguments &= ” “”Printer name”””
p.StartInfo.UseShellExecute = False
p.StartInfo.Verb = “printto”
p.Start()