Formatting issue Streamreader, Spacing is off

Posted on 2005-04-19
Last Modified: 2008-02-26
I want to preserve that allignment when I streamread my dos output file into my textbox.  The output file looks fine in Wordpad but does not line up correctly when read into a text box.  Please instruct me on how to preserve the DOS format.

My streamreader reads a dos output file (.out file) to my textbox like so:

 99.925           40        0        0
 99.950           70        0        0
 99.975          130        0        0
 99.990          2000       10        0
 99.993          2200       40        0

This is close to how the text file looks (left aligned columns) before streamreading (in wordpad) :

 99.925          40           0          0
 99.950          70           0          0
 99.975          130         0           0
 99.990          2000       10         0
 99.993          2200       40         0

Question by:RSullivan1
    LVL 25

    Expert Comment

    Are there tabs or spaces in your dos output file ?
    LVL 96

    Expert Comment

    by:Bob Learned
    Proportional font, or non-proportional font?


    Author Comment

    it is a proportional font and I am not sure how DOS outputs the file but Tabs would seem possible
    LVL 96

    Accepted Solution

    Try with a non-proportional font, such as Courier New.


    Author Comment


    Works Perfectly with Courier New.  Thanks a lot, I appreciate it!

    Author Comment

    Yes, how do you close this?

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    Suggested Solutions

    Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now