Viewing and Printing a .txt file from a WinForm

  • Thread starter Thread starter Tim Smith
  • Start date Start date
T

Tim Smith

Hello-

I have an application that opens a .txt file and displays
the data in a richtextbox using the .LoadFile method.
This all works, but here is my problem(s):

When the .txt document is loaded into the richtextbox, it
messes up the format (columns) versus opening the file
directly in notepad. How can I get it to display
correctly on the WinForm?

Also, how can I print the .txt file so that it looks like
it does when I print it directly from notpad?

Thank you all very much for your help!


Tim
 
When the .txt document is loaded into the richtextbox, it messes up the format (columns) versus opening the file directly in notepad. How can I get it to display correctly on the WinForm?

Set font of RichTextBox to fixed width font like Courier, Lucida Console.
 
Back
Top