printing help

hello, here is my code...my problem is I cannot print my name & phone text box. How do I get my program to get the user's entered data so it may print? Can anyone please guide me in the right direction?


Private Sub mnuprint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuprint.Click
Try
PrintDocument1.DefaultPageSettings = PrintPageSettings
StringToPrint = NameTextBox.Text
StringToPrint = PhoneTextBox.Text
PrintDialog1.Document = PrintDocument1
Dim result As DialogResult = PrintDialog1.ShowDialog()
If result = DialogResult.OK Then
PrintDocument1.Print()
End If
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub

Peace,
Wayne
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories