CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: chr$(13)

  1. #1
    Join Date
    Jan 2000
    Posts
    10

    chr$(13)

    i have a richtextbox. When I want to add text to it, I want it to be added directly to the next line in the richtextbox. How can that be done? I have tried chr(13) and chr$(13) but no hope yet. All I get is an invalid character and the text is on the same line.


  2. #2
    Join Date
    Nov 1999
    Location
    Italy
    Posts
    80

    Re: chr$(13)

    You have to use the VB const "vbcrlf", it adds new line and line feed. I had this problem too.

    Something over there is coding....
    ... and you don't know!

  3. #3
    Join Date
    Aug 1999
    Location
    Pakistan
    Posts
    366

    Re: chr$(13)

    The following code will print
    "My Name is
    Chem1"

    dim Msg string
    msg="My Name is "
    msg= vbCrLf+ "chem1"
    msgbox Msg 'or yu can say print Msg





  4. #4
    Join Date
    Jan 2000
    Posts
    19

    Re: chr$(13)

    Better still:

    Dim Msg As String
    Msg = "My Name is" & vbCrLf & "chem1"
    msgbox Msg


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured