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. Visual Basic
  4. line numbers?

line numbers?

Scheduled Pinned Locked Moved Visual Basic
question
9 Posts 5 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.
  • R Offline
    R Offline
    Rahithi
    wrote on last edited by
    #1

    hi all, how can we c the line number in our code window? Thnaks, Rahi

    If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "

    P C 2 Replies Last reply
    0
    • R Rahithi

      hi all, how can we c the line number in our code window? Thnaks, Rahi

      If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "

      P Offline
      P Offline
      priya_p233
      wrote on last edited by
      #2

      dear its so easy.........line no. is displayed on status bar (Down on window)of our code window as Ln . for e.g. Ln 19 col 9 it means our cursor is on line 19 & col 9 is it ok or ur question was differnt? :)

      priya

      1 Reply Last reply
      0
      • R Rahithi

        hi all, how can we c the line number in our code window? Thnaks, Rahi

        If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #3

        If you're using .NET, then, yes.  Just go into the Tools/Options/Text Editor, choose VB, and check the box.

        Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert

        A 1 Reply Last reply
        0
        • C Christian Graus

          If you're using .NET, then, yes.  Just go into the Tools/Options/Text Editor, choose VB, and check the box.

          Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert

          A Offline
          A Offline
          amaneet
          wrote on last edited by
          #4

          Sir, Can I programically find , In which line number presently I am.(using vb.net 2005) Thanks and regards pankaj

          C 1 Reply Last reply
          0
          • A amaneet

            Sir, Can I programically find , In which line number presently I am.(using vb.net 2005) Thanks and regards pankaj

            C Offline
            C Offline
            Christian Graus
            wrote on last edited by
            #5

            I doubt it

            Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert

            A 1 Reply Last reply
            0
            • C Christian Graus

              I doubt it

              Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert

              A Offline
              A Offline
              amaneet
              wrote on last edited by
              #6

              sir, U mean , i can't calculate the linenumber in the textbox (multiline option or richeditcontrol ) Thnaks and Regards pankaj

              C 1 Reply Last reply
              0
              • A amaneet

                sir, U mean , i can't calculate the linenumber in the textbox (multiline option or richeditcontrol ) Thnaks and Regards pankaj

                C Offline
                C Offline
                Christian Graus
                wrote on last edited by
                #7

                You know, you ask a different question every time.  Yes, of course you can work out a line number from a textbox.  Just count the number of newlines.

                Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert

                A 1 Reply Last reply
                0
                • C Christian Graus

                  You know, you ask a different question every time.  Yes, of course you can work out a line number from a textbox.  Just count the number of newlines.

                  Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert

                  A Offline
                  A Offline
                  amaneet
                  wrote on last edited by
                  #8

                  sorry sir, I did not mean that . I wanted to know , the line number , On which the cursor presently is, into the textbox , programically. Thanks and regards Pankaj

                  E 1 Reply Last reply
                  0
                  • A amaneet

                    sorry sir, I did not mean that . I wanted to know , the line number , On which the cursor presently is, into the textbox , programically. Thanks and regards Pankaj

                    E Offline
                    E Offline
                    Enriad
                    wrote on last edited by
                    #9

                    Hi, you can take a look here for a start: http://www.codeproject.com/cs/samples/linenumberingapp.asp[^] There are also heaps of hits on google which let you use GetCurPos() and GetCursorPos() to get the position of the caret if you wish to return the line you are currently editing. I'm sure there are some built in things in the framework, though I'm really tired and can't think at the moment. Cheers, Daniel

                    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