Howdy, Stranger!

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

Categories

printing help

waynebwayneb Member Posts: 2
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

Comments

  • Shawn CarterShawn Carter Member Posts: 0

    \ http://forcoder.org \ free video tutorials and ebooks about [ C++, C#, Go, JavaScript, Python, Swift, Delphi, Assembly, Visual Basic .NET, Perl, PHP, Scratch, R, Ruby, MATLAB, Java, Objective-C, Visual Basic, PL/SQL, C Scala, Kotlin, Dart, Apex, Julia, F#, ABAP, Awk, D, Fortran, Lua, ML, SAS, Ada, FoxPro, Bash, LabVIEW, Clojure, Hack, Lisp, COBOL, Transact-SQL, Crystal, Logo, Prolog, Erlang, Alice, Scheme, VBScript, Rust ] _____________

Sign In or Register to comment.