0
我有一種方法正在用於在幻燈片中打印頁面。打印菜單visual basic
Public Sub printSlide(ByVal e As PrintPageEventArgs)
drawSlide(e.Graphics)
If Current < fSlides.Count - 1 Then
fPagePrinting = fPagePrinting + 1
e.HasMorePages = True
Else
e.HasMorePages = False
fPagePrinting = 0
End If
End Sub
我想從菜單打印選項,這將無法正常工作訪問此方法。我哪裏出錯了!
Private Sub printMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles printMenuItem.Click
If aPrintDialog.ShowDialog() = Windows.Forms.DialogResult.OK Then
fSlideShowAdmin.printSlide()
End If
End Sub
有一堆代碼缺失。您的方法與PrintDocument.PrintPage事件的事件處理程序的合理相似之處。我沒有看到Handles關鍵字,PrintDocument對象和Print()方法調用。直接調用事件處理程序將不起作用。 – 2012-03-03 22:12:21