DevAdmin Blog

Blog di Ermanno Goletto (Microsoft MVP Directory Services - MCITP - MCTS - MCSA - MCP)
posts - 886, comments - 447, trackbacks - 13

My Links

News

Avatar

Curriculum Vitae

Visualizza il profilo di Ermanno Goletto su LinkedIn


Il contenuto di questo blog e di ciascun post viene fornito “così come é”, senza garanzie, e non conferisce alcun diritto. Questo blog riporta il mio personale pensiero che non riflette necessariamente il pensiero del mio datore di lavoro.

Logo Creative Commons Deed


Logo SysAdmin.it SysAdmin.it Staff


Logo TechNet Forum TechNet Italia @ForumTechNetIt Follow TechNet Forum on Twitter


Logo MVP


Ermanno Goletto Follow ermannog on Twitter

Article Categories

Archives

Post Categories

Blogs

Friends

Knowledge Base

MVP Sites

Resources

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()  

Print | posted on Tuesday, October 11, 2005 5:45 PM | Filed Under [ Code, Snippets & Scripts .NET ]

Feedback

No comments posted yet.

Post Comment

Title  
Name  
Email
Url
Comment   
Please add 1 and 6 and type the answer here:

Powered by:
Powered By Subtext Powered By ASP.NET