new line char

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • varunrap
    New Member
    • Jul 2008
    • 10

    new line char

    this is my text. how do i insert a new line char in vb6.0

    label1.Text = "There was a problem with your payment. Please check your credit card information and try again. Make sure the credit card number is entered correctly (no spaces, hyphens or other punctuation). * The CVV2 code must be current and correctly entered. * The expiration date must be current and correctly entered. If you still are unable to submit the payment with the credit card you are using, contact your credit card provider for direct service to verify that the information on your card is current."
  • jeffstl
    Recognized Expert Contributor
    • Feb 2008
    • 432

    #2
    Need to use the carriage return within your string to start a new line

    Code:
    label1.Text = "This is the First line " & vbCrLf & " and this is the second line"

    Comment

    • varunrap
      New Member
      • Jul 2008
      • 10

      #3
      tried it. but it is not working in the .net environment. also tried environment.new line and vbnewline

      Comment

      • jeffstl
        Recognized Expert Contributor
        • Feb 2008
        • 432

        #4
        Originally posted by varunrap
        tried it. but it is not working in the .net environment. also tried environment.new line and vbnewline
        OK. Well that is interesting because you specifically asked "this is my text. how do i insert a new line char in vb6.0"

        Yes the .NET environment will be different and another thing that will be different is what you are writing out to.

        Is this DHTML output? Is it output to a client interface?

        If it is DHTML output on say a webpage, then you can use either dynamic <tr> or a <br> tag to start a new line.

        Comment

        • varunrap
          New Member
          • Jul 2008
          • 10

          #5
          it is the o/p to a client interface. the actual project i am working on is in vb6.0 but trying it out on the .net environment. sorry if i led u astray.

          Comment

          • jeffstl
            Recognized Expert Contributor
            • Feb 2008
            • 432

            #6
            Originally posted by varunrap
            it is the o/p to a client interface. the actual project i am working on is in vb6.0 but trying it out on the .net environment. sorry if i led u astray.
            Oh ok. Well actually the vbCrLf should technically still work even in a .NET environment.

            If that doesnt though you are on the right track with .NewLine, etc.

            Though you mentioned it doesnt work, so I guess I'd be curious to know what that means exactly. Did you get an error? Is the output unchanged? What about it isn't working?

            Comment

            • varunrap
              New Member
              • Jul 2008
              • 10

              #7
              Originally posted by jeffstl
              Oh ok. Well actually the vbCrLf should technically still work even in a .NET environment.

              If that doesnt though you are on the right track with .NewLine, etc.

              Though you mentioned it doesnt work, so I guess I'd be curious to know what that means exactly. Did you get an error? Is the output unchanged? What about it isn't working?

              I do not get a compilation error. but wen i do get the o/p it is
              "this is the first line and this is the second line. "
              does not put it to the next line.

              Comment

              • jeffstl
                Recognized Expert Contributor
                • Feb 2008
                • 432

                #8
                Sorry it took me a bit

                I think this page has the info you want

                VB.NET carriage return

                Comment

                Working...