简体   繁体   中英

opening the Windows Print Pictures dialog using VB.Net

I want to call the Windows Print Pictures dialog using VB.net. the one Windows comes up with when you go to print a picture, the one that lets you print full page, 8X10, 4X6, 5X7, contact sheet, etc.

I've tried using printdocument and printdialog but those only give you the standard print dialog window for documents.

I've searched Google and all the results were completely unrelated to the Print Pictures dialog and therefore completely useless.

I've seen the same question for C+ here Print image using windows print image dialog using CLSID_PrintPhotosDropTarget COM object. but this doesn't really help me since I'm using VB.net (Visual Studio 2008 to be precise) but I'm including it here as it has a screenshot of the dialog I am trying to call.

any help would be appreciated.

Okay, just this once, I will translate for you but you need to find an on line converter that you like. Many examples are available in C#. Also please take the tour to learn how to ask a proper question.

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    'The C# code
    'String fileName = @"C:\Development\myImage.tif";//pass in Or whatever you need
    'var p = New Process();
    'p.StartInfo.FileName = fileName;
    'p.StartInfo.Verb = "Print";
    'p.Start();
    Dim fileName = "C:\Users\xxxx\Desktop\Graphics\Baby owl.jpg"
    Dim p = New Process
    p.StartInfo.FileName = fileName
    p.StartInfo.Verb = "Print"
    p.Start()
End Sub

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM