如何在PrintPreviewDialog中显示PrintDialog

时间:2013-10-07 08:12:22

标签: c++ winforms visual-studio-2012 print-preview printdialog

当我点击PrintPreviewDialog中的“Print”按钮时,我想显示PrintDialog(选择打印机)。我已经在printdocument1_BeginPrint中添加了代码,但它无法正常工作

private: System::Void printDocument1_BeginPrint(
    System::Object^ sender, 
    System::Drawing::Printing::PrintEventArgs^ e) 
{
    if (printDocument1->BeginPrint!=printDocument1->Print->PrintToPreview)
        printDialog1->ShowDialog();
}

我使用visual studio 2012 C ++窗体。

0 个答案:

没有答案