Drawing lines other than with "-"

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Zach

    #1

    Drawing lines other than with "-"

    In an invoicing program I draw lines in a text file
    using:

    new string ("-",73)
    new string ("=",73)

    These lines look awful.
    Is there a better way?

    Much obliged.
    Zach.


  • Bob Powell [MVP]

    #2
    Re: Drawing lines other than with "-"

    Had you thought about outputting HTML? You can only use the characters in a
    text file but an invoice rendered in HTML can be as rich as you like.

    --
    Bob Powell [MVP]
    Visual C#, System.Drawing

    Find great Windows Forms articles in Windows Forms Tips and Tricks


    Answer those GDI+ questions with the GDI+ FAQ


    All new articles provide code in C# and VB.NET.
    Subscribe to the RSS feeds provided and never miss a new article.





    "Zach" <00@00.00> wrote in message
    news:9e9fc$425f 72ba$3e1584fc$1 1076@freeler.nl ...[color=blue]
    > In an invoicing program I draw lines in a text file
    > using:
    >
    > new string ("-",73)
    > new string ("=",73)
    >
    > These lines look awful.
    > Is there a better way?
    >
    > Much obliged.
    > Zach.
    >
    >[/color]


    Comment

    • Zach

      #3
      Re: Drawing lines other than with &quot;-&quot;

      I don't want to get into HTML.

      Re alternatives for:

      new string ("-",73)

      Can one use unicode (&#151??) If so, how
      should that be done, please give example code.

      Many thanks.

      Zach.


      "Bob Powell [MVP]" <bob@_spamkille r_bobpowell.net > wrote in message
      news:eBLv0SZQFH A.248@TK2MSFTNG P15.phx.gbl...[color=blue]
      > Had you thought about outputting HTML? You can only use the characters in[/color]
      a[color=blue]
      > text file but an invoice rendered in HTML can be as rich as you like.
      >
      > --
      > Bob Powell [MVP]
      > Visual C#, System.Drawing
      >
      > Find great Windows Forms articles in Windows Forms Tips and Tricks
      > http://www.bobpowell.net/tipstricks.htm
      >
      > Answer those GDI+ questions with the GDI+ FAQ
      > http://www.bobpowell.net/faqmain.htm
      >
      > All new articles provide code in C# and VB.NET.
      > Subscribe to the RSS feeds provided and never miss a new article.
      >
      >
      >
      >
      >
      > "Zach" <00@00.00> wrote in message
      > news:9e9fc$425f 72ba$3e1584fc$1 1076@freeler.nl ...[color=green]
      > > In an invoicing program I draw lines in a text file
      > > using:
      > >
      > > new string ("-",73)
      > > new string ("=",73)
      > >
      > > These lines look awful.
      > > Is there a better way?
      > >
      > > Much obliged.
      > > Zach.
      > >
      > >[/color]
      >
      >[/color]


      Comment

      • John Davison

        #4
        Re: Drawing lines other than with &quot;-&quot;

        Zach wrote:[color=blue]
        > In an invoicing program I draw lines in a text file
        > using:
        >
        > new string ("-",73)
        > new string ("=",73)
        >
        > These lines look awful.
        > Is there a better way?
        >
        > Much obliged.
        > Zach.
        >
        >[/color]

        What about underscores?
        _______________ ________

        Comment

        • Bob Powell [MVP]

          #5
          Re: Drawing lines other than with &quot;-&quot;

          It used to be that character sets had all sorts of cool things in. That's
          not much of an option these days because almost everything is proportional.
          Aside from John's suggestion of underscores for horizontal lines and pipes
          '|' for vertical lines I have nothing to suggest.

          Maybe you can use some wingdings??

          Sorry.

          --
          Bob Powell [MVP]
          Visual C#, System.Drawing

          Find great Windows Forms articles in Windows Forms Tips and Tricks


          Answer those GDI+ questions with the GDI+ FAQ


          All new articles provide code in C# and VB.NET.
          Subscribe to the RSS feeds provided and never miss a new article.





          "Zach" <00@00.00> wrote in message
          news:d65c8$425f a2a6$3e15a08d$1 3710@freeler.nl ...[color=blue]
          >I don't want to get into HTML.
          >
          > Re alternatives for:
          >
          > new string ("-",73)
          >
          > Can one use unicode (&#151??) If so, how
          > should that be done, please give example code.
          >
          > Many thanks.
          >
          > Zach.
          >
          >
          > "Bob Powell [MVP]" <bob@_spamkille r_bobpowell.net > wrote in message
          > news:eBLv0SZQFH A.248@TK2MSFTNG P15.phx.gbl...[color=green]
          >> Had you thought about outputting HTML? You can only use the characters in[/color]
          > a[color=green]
          >> text file but an invoice rendered in HTML can be as rich as you like.
          >>
          >> --
          >> Bob Powell [MVP]
          >> Visual C#, System.Drawing
          >>
          >> Find great Windows Forms articles in Windows Forms Tips and Tricks
          >> http://www.bobpowell.net/tipstricks.htm
          >>
          >> Answer those GDI+ questions with the GDI+ FAQ
          >> http://www.bobpowell.net/faqmain.htm
          >>
          >> All new articles provide code in C# and VB.NET.
          >> Subscribe to the RSS feeds provided and never miss a new article.
          >>
          >>
          >>
          >>
          >>
          >> "Zach" <00@00.00> wrote in message
          >> news:9e9fc$425f 72ba$3e1584fc$1 1076@freeler.nl ...[color=darkred]
          >> > In an invoicing program I draw lines in a text file
          >> > using:
          >> >
          >> > new string ("-",73)
          >> > new string ("=",73)
          >> >
          >> > These lines look awful.
          >> > Is there a better way?
          >> >
          >> > Much obliged.
          >> > Zach.
          >> >
          >> >[/color]
          >>
          >>[/color]
          >
          >[/color]


          Comment

          • TT (Tom Tempelaere)

            #6
            Re: Drawing lines other than with &quot;-&quot;

            Hey,

            What about drawing them, enough API in .NET to do that.

            TT


            "John Davison" wrote:
            [color=blue]
            > Zach wrote:[color=green]
            > > In an invoicing program I draw lines in a text file
            > > using:
            > >
            > > new string ("-",73)
            > > new string ("=",73)
            > >
            > > These lines look awful.
            > > Is there a better way?
            > >
            > > Much obliged.
            > > Zach.
            > >
            > >[/color]
            >
            > What about underscores?
            > _______________ ________
            >[/color]

            Comment

            • Zach

              #7
              Re: Drawing lines other than with &quot;-&quot;

              I am using Courier with proportional spacing.

              "Bob Powell [MVP]" <bob@_spamkille r_bobpowell.net > wrote in message
              news:#PiYxKfQFH A.3664@TK2MSFTN GP15.phx.gbl...[color=blue]
              > It used to be that character sets had all sorts of cool things in. That's
              > not much of an option these days because almost everything is[/color]
              proportional.[color=blue]
              > Aside from John's suggestion of underscores for horizontal lines and pipes
              > '|' for vertical lines I have nothing to suggest.
              >
              > Maybe you can use some wingdings??
              >
              > Sorry.
              >
              > --
              > Bob Powell [MVP]
              > Visual C#, System.Drawing
              >
              > Find great Windows Forms articles in Windows Forms Tips and Tricks
              > http://www.bobpowell.net/tipstricks.htm
              >
              > Answer those GDI+ questions with the GDI+ FAQ
              > http://www.bobpowell.net/faqmain.htm
              >
              > All new articles provide code in C# and VB.NET.
              > Subscribe to the RSS feeds provided and never miss a new article.
              >
              >
              >
              >
              >
              > "Zach" <00@00.00> wrote in message
              > news:d65c8$425f a2a6$3e15a08d$1 3710@freeler.nl ...[color=green]
              > >I don't want to get into HTML.
              > >
              > > Re alternatives for:
              > >
              > > new string ("-",73)
              > >
              > > Can one use unicode (&#151??) If so, how
              > > should that be done, please give example code.
              > >
              > > Many thanks.
              > >
              > > Zach.
              > >
              > >
              > > "Bob Powell [MVP]" <bob@_spamkille r_bobpowell.net > wrote in message
              > > news:eBLv0SZQFH A.248@TK2MSFTNG P15.phx.gbl...[color=darkred]
              > >> Had you thought about outputting HTML? You can only use the characters[/color][/color][/color]
              in[color=blue][color=green]
              > > a[color=darkred]
              > >> text file but an invoice rendered in HTML can be as rich as you like.
              > >>
              > >> --
              > >> Bob Powell [MVP]
              > >> Visual C#, System.Drawing
              > >>
              > >> Find great Windows Forms articles in Windows Forms Tips and Tricks
              > >> http://www.bobpowell.net/tipstricks.htm
              > >>
              > >> Answer those GDI+ questions with the GDI+ FAQ
              > >> http://www.bobpowell.net/faqmain.htm
              > >>
              > >> All new articles provide code in C# and VB.NET.
              > >> Subscribe to the RSS feeds provided and never miss a new article.
              > >>
              > >>
              > >>
              > >>
              > >>
              > >> "Zach" <00@00.00> wrote in message
              > >> news:9e9fc$425f 72ba$3e1584fc$1 1076@freeler.nl ...
              > >> > In an invoicing program I draw lines in a text file
              > >> > using:
              > >> >
              > >> > new string ("-",73)
              > >> > new string ("=",73)
              > >> >
              > >> > These lines look awful.
              > >> > Is there a better way?
              > >> >
              > >> > Much obliged.
              > >> > Zach.
              > >> >
              > >> >
              > >>
              > >>[/color]
              > >
              > >[/color]
              >
              >[/color]


              Comment

              • Zach

                #8
                Re: Drawing lines other than with &quot;-&quot;

                So my conclusion should be that it isn't possible
                and I am left with ...new string ('-', number_off);

                ??


                Comment

                • Zach

                  #9
                  Re: Drawing lines other than with &quot;-&quot;

                  Re the post below: The function gives ---
                  i.e. a discontinuous and ugly line. I would
                  wish to draw a continuous line, however
                  not using underscores, which would be
                  an option, because then you get the line
                  too low. The line is drwan in a text file
                  which I print. I do not wish to use HTML,
                  with which I understand the problem could
                  be solved, because the application is
                  written and I do not want to rewrite the
                  whole thing.

                  Zach.


                  "Zach" <00@00.00> wrote in message
                  news:3a9e3$4262 ae9e$3e159f0a$1 9900@freeler.nl ...[color=blue]
                  > So my conclusion should be that it isn't possible
                  > and I am left with ...new string ('-', number_off);
                  >
                  > ??
                  >
                  >[/color]


                  Comment

                  • Peter N Roth

                    #10
                    Re: Drawing lines other than with &quot;-&quot;

                    i havent tried this, but how about using the
                    ascii drawing chars? (i cant find them in Word)
                    or the Em dash (ascii 151)

                    --
                    Grace + Peace,
                    Peter N Roth
                    Engineering Objects International

                    Home of Matrix.NET


                    "Zach" <00@00.00> wrote in message
                    news:b5066$4269 3d43$3e159930$2 8679@freeler.nl ...[color=blue]
                    > Re the post below: The function gives ---
                    > i.e. a discontinuous and ugly line. I would
                    > wish to draw a continuous line, however
                    > not using underscores, which would be
                    > an option, because then you get the line
                    > too low. The line is drwan in a text file
                    > which I print. I do not wish to use HTML,
                    > with which I understand the problem could
                    > be solved, because the application is
                    > written and I do not want to rewrite the
                    > whole thing.
                    >
                    > Zach.
                    >
                    >
                    > "Zach" <00@00.00> wrote in message
                    > news:3a9e3$4262 ae9e$3e159f0a$1 9900@freeler.nl ...[color=green]
                    >> So my conclusion should be that it isn't possible
                    >> and I am left with ...new string ('-', number_off);
                    >>
                    >> ??
                    >>
                    >>[/color]
                    >
                    >[/color]


                    Comment

                    • Zach

                      #11
                      Re: Drawing lines other than with &quot;-&quot;

                      (char)151 draws funnies on the screen and prints enigmas.

                      "Peter N Roth" <refusing.spam@ mycompany.com> wrote in message
                      news:OA0ao14RFH A.508@TK2MSFTNG P12.phx.gbl...[color=blue]
                      > i havent tried this, but how about using the
                      > ascii drawing chars? (i cant find them in Word)
                      > or the Em dash (ascii 151)
                      >
                      > --
                      > Grace + Peace,
                      > Peter N Roth
                      > Engineering Objects International
                      > http://engineeringobjects.com
                      > Home of Matrix.NET
                      >
                      >
                      > "Zach" <00@00.00> wrote in message
                      > news:b5066$4269 3d43$3e159930$2 8679@freeler.nl ...[color=green]
                      > > Re the post below: The function gives ---
                      > > i.e. a discontinuous and ugly line. I would
                      > > wish to draw a continuous line, however
                      > > not using underscores, which would be
                      > > an option, because then you get the line
                      > > too low. The line is drwan in a text file
                      > > which I print. I do not wish to use HTML,
                      > > with which I understand the problem could
                      > > be solved, because the application is
                      > > written and I do not want to rewrite the
                      > > whole thing.
                      > >
                      > > Zach.
                      > >
                      > >
                      > > "Zach" <00@00.00> wrote in message
                      > > news:3a9e3$4262 ae9e$3e159f0a$1 9900@freeler.nl ...[color=darkred]
                      > >> So my conclusion should be that it isn't possible
                      > >> and I am left with ...new string ('-', number_off);
                      > >>
                      > >> ??
                      > >>
                      > >>[/color]
                      > >
                      > >[/color]
                      >
                      >[/color]


                      Comment

                      Working...