PAffiliates
Member
- Joined
- Aug 15, 2007
- Messages
- 10
- Programming Experience
- Beginner
Once I print using the following code my program automatically closes. Why is this? Is there any way to keep it open so the user can enter and print more information?
Private Sub printButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles printButton.Click
'Code that handles the printing of information
PrintDialog.Document = PrintDocument
PrintDialog.ShowDialog()
PrintDocument.Print()
End Sub
Also, when the print dialog does come up, even when you click cancel it still prints the job instead of just closing the window. Why is this?
Any help would be greatly appreciated! Thank you everyone for your time!
Private Sub printButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles printButton.Click
'Code that handles the printing of information
PrintDialog.Document = PrintDocument
PrintDialog.ShowDialog()
PrintDocument.Print()
End Sub
Also, when the print dialog does come up, even when you click cancel it still prints the job instead of just closing the window. Why is this?
Any help would be greatly appreciated! Thank you everyone for your time!
Last edited: