Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. write file question

write file question

Scheduled Pinned Locked Moved C#
question
11 Posts 7 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mahraja
    wrote on last edited by
    #1

    Hi Is it possible to write in a text file with a color other than black? How?

    L P A realJSOPR D 5 Replies Last reply
    0
    • M mahraja

      Hi Is it possible to write in a text file with a color other than black? How?

      L Offline
      L Offline
      leppie
      wrote on last edited by
      #2

      mahraja wrote:

      Is it possible to write in a text file with a color other than black?

      Yes, simple! File.Write(" "), see, it's white now... :doh:

      xacc.ide - now with TabsToSpaces support
      IronScheme - 1.0 alpha 4a out now (29 May 2008)

      1 Reply Last reply
      0
      • M mahraja

        Hi Is it possible to write in a text file with a color other than black? How?

        P Offline
        P Offline
        PIEBALDconsult
        wrote on last edited by
        #3

        Huh? I write in grey-on-blue.

        1 Reply Last reply
        0
        • M mahraja

          Hi Is it possible to write in a text file with a color other than black? How?

          A Offline
          A Offline
          Alan Balkany
          wrote on last edited by
          #4

          No, not directly because a text file only contains unicode characters, which don't have color information. You could automate Wordpad or Word to write a .rtf or .doc file which can contain color information. A simpler alternative might be to define your own file header format, containing color information (and anything else you want). Then your application could read this header and display the following text in the desired color.

          P 1 Reply Last reply
          0
          • A Alan Balkany

            No, not directly because a text file only contains unicode characters, which don't have color information. You could automate Wordpad or Word to write a .rtf or .doc file which can contain color information. A simpler alternative might be to define your own file header format, containing color information (and anything else you want). Then your application could read this header and display the following text in the desired color.

            P Offline
            P Offline
            PIEBALDconsult
            wrote on last edited by
            #5

            Alan Balkany wrote:

            automate Wordpad or Word

            Or use a RichTextBox.

            Alan Balkany wrote:

            define your own file header format

            Or use XML.

            A 1 Reply Last reply
            0
            • P PIEBALDconsult

              Alan Balkany wrote:

              automate Wordpad or Word

              Or use a RichTextBox.

              Alan Balkany wrote:

              define your own file header format

              Or use XML.

              A Offline
              A Offline
              Alan Balkany
              wrote on last edited by
              #6

              Or use a RichTextBox. Good idea.

              1 Reply Last reply
              0
              • M mahraja

                Hi Is it possible to write in a text file with a color other than black? How?

                realJSOPR Online
                realJSOPR Online
                realJSOP
                wrote on last edited by
                #7

                idiot.

                "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                -----
                "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                L 1 Reply Last reply
                0
                • realJSOPR realJSOP

                  idiot.

                  "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                  -----
                  "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  You really shouldn't keep your feelings bottled up John. :-)

                  Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Individuality is fine, as long as we do it together - F. Burns

                  realJSOPR 1 Reply Last reply
                  0
                  • L Lost User

                    You really shouldn't keep your feelings bottled up John. :-)

                    Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Individuality is fine, as long as we do it together - F. Burns

                    realJSOPR Online
                    realJSOPR Online
                    realJSOP
                    wrote on last edited by
                    #9

                    If his question was worded more precisely, I wouldn't have to hold back like that. :) File bits are color-agnostic...

                    "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                    -----
                    "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                    L 1 Reply Last reply
                    0
                    • realJSOPR realJSOP

                      If his question was worded more precisely, I wouldn't have to hold back like that. :) File bits are color-agnostic...

                      "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                      -----
                      "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #10

                      Wow.... Do you have a flock of uni-voters around you like celebrities have paparazzi?

                      Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Individuality is fine, as long as we do it together - F. Burns

                      1 Reply Last reply
                      0
                      • M mahraja

                        Hi Is it possible to write in a text file with a color other than black? How?

                        D Offline
                        D Offline
                        darkelv
                        wrote on last edited by
                        #11

                        mahraja wrote:

                        Hi Is it possible to write in a text file with a color other than black? How?

                        Usually you can only write in 1 color unless you can find a rainbow colored floppy disc....

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups