Hello All,I have an assignment where I'm supposed to create a simple text editor but I'm having some issues with the print function. I thought I could print by using the following:
**************************************
Private Sub btnPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrint.Click
Dim print As PrintDialog = New PrintDialog()
btnPrint.Enabled = print.ShowDialog()
If print.ShowDialog() = Windows.Forms.DialogResult.OK Then
End If
End Sub
**************************************
It does open the print dialog box but when I select OK it simply redisplays the print dialog box. I press OK again and the dialog box disappears but nothing prints. Please keep in mind I am totally an amateur so any hints or tips on how I can achieve this would be very helpful.
**************************************
Private Sub btnPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrint.Click
Dim print As PrintDialog = New PrintDialog()
btnPrint.Enabled = print.ShowDialog()
If print.ShowDialog() = Windows.Forms.DialogResult.OK Then
End If
End Sub
**************************************
It does open the print dialog box but when I select OK it simply redisplays the print dialog box. I press OK again and the dialog box disappears but nothing prints. Please keep in mind I am totally an amateur so any hints or tips on how I can achieve this would be very helpful.