Viewing and Printing a .txt file from a WinForm

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
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top