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. The Lounge
  3. Text Viewer

Text Viewer

Scheduled Pinned Locked Moved The Lounge
76 Posts 45 Posters 2 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.
  • B Bram van Kampen

    Christian Graus wrote:

    You should get him to add file/open functionality instead of just drag/drop.

    Yes, that's well spotted. However for the purpose I want to use it, I would pass the File Open info through the 'Environment', and default to an error screen, if someone just doubleclicked on it in windows explorer, they should get an eror message stating that is NOT a Stand Alone Application.

    Christian Graus wrote:

    The Express Edition of C# is, however, free.

    When we started writing in 1995, MFC was Free. The MFC 4.2 Compiler is still our weapon of choice, and has not failed us sofar. :)

    Bram van Kampen

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

    Bram van Kampen wrote:

    When we started writing in 1995, MFC was Free

    With 15+ years of windows GUI development you should be able to knock up a text viewer quicker than you can knock up your wife.

    L 1 Reply Last reply
    0
    • B Bram van Kampen

      All our Code is in MFC. We do not use Managed Code.

      Bram van Kampen

      A Offline
      A Offline
      AspDotNetDev
      wrote on last edited by
      #32

      If you want to create an app yourself and you don't want to use managed code, just allow the user to page through the file in 32KB chunks. Create a right arrow button that will go the next 32K and a left arrow button that will go to the previous 32K. And maybe allow the user to specify how many bytes into the file to start the loading. There are more sophisticated techniques, but that shouldn't take too long to code.

      [Forum Guidelines]

      1 Reply Last reply
      0
      • C Christian Graus

        It takes VS 2008 20 seconds to start on my machine, and at least 8 seconds to compile the most basic app....

        Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

        D Offline
        D Offline
        Dario Solera
        wrote on last edited by
        #33

        Christian Graus wrote:

        It takes VS 2008 20 seconds to start on my machine

        4 seconds on mine, plus 10 seconds to rebuild a 120kloc, 16 projects solution. :cool: Time to buy a new PC Christian?

        If you truly believe you need to pick a mobile phone that "says something" about your personality, don't bother. You don't have a personality. A mental illness, maybe - but not a personality. - Charlie Brooker My Photos/CP Flickr Group - ScrewTurn Wiki v3

        P 1 Reply Last reply
        0
        • D DABBee

          6 secs to start and populate the Start page (don't ask me why I haven't disabled that, I don't know why.) Compiling is OK but I don't work on large projects....

          Candy: Here's the plan: we changes our names, move to a distant island, and disguise ourselves as a family of traveling donkey polishers.

          P Offline
          P Offline
          peterchen
          wrote on last edited by
          #34

          Ha! haha! Muhahahahahaha! Yaaaaaa![^]

          Agh! Reality! My Archnemesis![^]
          | FoldWithUs! | sighist | µLaunch - program launcher for server core and hyper-v server.

          R 1 Reply Last reply
          0
          • D Dario Solera

            Christian Graus wrote:

            It takes VS 2008 20 seconds to start on my machine

            4 seconds on mine, plus 10 seconds to rebuild a 120kloc, 16 projects solution. :cool: Time to buy a new PC Christian?

            If you truly believe you need to pick a mobile phone that "says something" about your personality, don't bother. You don't have a personality. A mental illness, maybe - but not a personality. - Charlie Brooker My Photos/CP Flickr Group - ScrewTurn Wiki v3

            P Offline
            P Offline
            peterchen
            wrote on last edited by
            #35

            call me Cassandra.

            Agh! Reality! My Archnemesis![^]
            | FoldWithUs! | sighist | µLaunch - program launcher for server core and hyper-v server.

            R 1 Reply Last reply
            0
            • P peterchen

              call me Cassandra.

              Agh! Reality! My Archnemesis![^]
              | FoldWithUs! | sighist | µLaunch - program launcher for server core and hyper-v server.

              R Offline
              R Offline
              Rajesh R Subramanian
              wrote on last edited by
              #36

              peterchen wrote:

              call me Cassandra.

              ;)

              “Follow your bliss.” – Joseph Campbell

              1 Reply Last reply
              0
              • B Bram van Kampen

                Hi, Does anyone know of a Text Viewer, (for basic .txt Files) which does NOT facilitate editing or Saving. :)

                Bram van Kampen

                M Offline
                M Offline
                Media2r
                wrote on last edited by
                #37

                Bram van Kampen wrote:

                Does anyone know of a Text Viewer, (for basic .txt Files) which does NOT facilitate editing

                Any Web Browser? The saving bit though... Perhaps a winform with an IE control with saving disabled? //L

                A 1 Reply Last reply
                0
                • B Bram van Kampen

                  Hi, Does anyone know of a Text Viewer, (for basic .txt Files) which does NOT facilitate editing or Saving. :)

                  Bram van Kampen

                  D Offline
                  D Offline
                  Don M
                  wrote on last edited by
                  #38

                  Baretail http://www.baremetalsoft.com/baretail/[^]

                  1 Reply Last reply
                  0
                  • C Christian Graus

                    Is the 32757 line limit a major issue ? Because the rest seems easy to deal with. Just don't make it read only, but write code to reject all keypresses.

                    Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

                    G Offline
                    G Offline
                    Gary Wheeler
                    wrote on last edited by
                    #39

                    Even simpler: Keep it readonly, intercept the WM_CTLCOLOR message, set the device context's background color to white, and return a white HBRUSH.

                    Software Zen: delete this;

                    1 Reply Last reply
                    0
                    • B Bram van Kampen

                      Hi, Does anyone know of a Text Viewer, (for basic .txt Files) which does NOT facilitate editing or Saving. :)

                      Bram van Kampen

                      D Offline
                      D Offline
                      delete from names
                      wrote on last edited by
                      #40

                      Just going by what's been described, wouldn't it be easier (and safer) to configure the file security to disallow modifications instead? Use any text editor you want at that point and save is disabled. It also means that people that decide not to use your text editor (because some people are sneaky that way :P) still can't edit.

                      1 Reply Last reply
                      0
                      • A AspDotNetDev

                        Took me a few minutes. The drag/drop logic tripped me up a bit.

                        [Forum Guidelines]

                        J Offline
                        J Offline
                        Johann Gerell
                        wrote on last edited by
                        #41

                        :laugh:

                        Time you enjoy wasting is not wasted time - Bertrand Russel

                        1 Reply Last reply
                        0
                        • M Media2r

                          Bram van Kampen wrote:

                          Does anyone know of a Text Viewer, (for basic .txt Files) which does NOT facilitate editing

                          Any Web Browser? The saving bit though... Perhaps a winform with an IE control with saving disabled? //L

                          A Offline
                          A Offline
                          AspDotNetDev
                          wrote on last edited by
                          #42

                          Media2r wrote:

                          Perhaps a winform with an IE control with saving disabled

                          :laugh: How about a freakin' TextBox?

                          [Forum Guidelines]

                          M 1 Reply Last reply
                          0
                          • B Bram van Kampen

                            Hi, Does anyone know of a Text Viewer, (for basic .txt Files) which does NOT facilitate editing or Saving. :)

                            Bram van Kampen

                            W Offline
                            W Offline
                            WilWol
                            wrote on last edited by
                            #43

                            Try the DAMN NFO viewer, meant for viewing, but not editing, NFO and DIZ, but does TXT as well. WW

                            1 Reply Last reply
                            0
                            • A AspDotNetDev

                              Media2r wrote:

                              Perhaps a winform with an IE control with saving disabled

                              :laugh: How about a freakin' TextBox?

                              [Forum Guidelines]

                              M Offline
                              M Offline
                              Media2r
                              wrote on last edited by
                              #44

                              I just skimmed earlier posts prior to posting mine, it seemed someone mentioned some limitations with textboxes. I admitedly have no clue if they are accurate, I haven't done winform dev for aaaaages. That said, a multiline readonly textbox (assuming text length limitation prognoses is incorrect) would be sexier. And I'm all for sexier. //L

                              1 Reply Last reply
                              0
                              • B Bram van Kampen

                                Hi, Does anyone know of a Text Viewer, (for basic .txt Files) which does NOT facilitate editing or Saving. :)

                                Bram van Kampen

                                H Offline
                                H Offline
                                hsidhu
                                wrote on last edited by
                                #45

                                open command prompt type :laugh:

                                G 1 Reply Last reply
                                0
                                • C Christian Graus

                                  It takes VS 2008 20 seconds to start on my machine, and at least 8 seconds to compile the most basic app....

                                  Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

                                  J Offline
                                  J Offline
                                  Jesus Portillo
                                  wrote on last edited by
                                  #46

                                  drive yourself...

                                  1 Reply Last reply
                                  0
                                  • B Bram van Kampen

                                    Hi, Does anyone know of a Text Viewer, (for basic .txt Files) which does NOT facilitate editing or Saving. :)

                                    Bram van Kampen

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

                                    http://www.textpad.com but open the file in read only mode. Even in read/write mode, I've opened 16mb files before with little decrease in speed.

                                    1 Reply Last reply
                                    0
                                    • B Bram van Kampen

                                      Christian Graus wrote:

                                      Is the 32757 line limit a major issue ? Because the rest seems easy to deal with. Just don't make it read only, but write code to reject all keypresses.

                                      Yes, it is! We have Basic Log Files, which record transactions in ASCII, and which would cover up to six years of trading. The biggest sofar contans 425,000 lines. it is not accessed very frequently, but, the concern is that we have no tool to access it which disallows modification. Notepad loads it Sofar No Problems, it Takes a Long Time, No Problem, but it facilitates modification.

                                      Bram van Kampen

                                      L Offline
                                      L Offline
                                      Lynn Wallace
                                      wrote on last edited by
                                      #48

                                      Can you just make the file read-only?

                                      1 Reply Last reply
                                      0
                                      • B Bram van Kampen

                                        Hi, Does anyone know of a Text Viewer, (for basic .txt Files) which does NOT facilitate editing or Saving. :)

                                        Bram van Kampen

                                        C Offline
                                        C Offline
                                        Chris F Carroll
                                        wrote on last edited by
                                        #49

                                        I'm with Don M. For reading looooooong log files you want a version of Tail http://en.wikipedia.org/wiki/Tail\_(Unix)

                                        1 Reply Last reply
                                        0
                                        • B Bram van Kampen

                                          Hi, Does anyone know of a Text Viewer, (for basic .txt Files) which does NOT facilitate editing or Saving. :)

                                          Bram van Kampen

                                          B Offline
                                          B Offline
                                          bahalana
                                          wrote on last edited by
                                          #50

                                          Notepad++ will allow opening files read-only with the '-ro' command line argument.

                                          P 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