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

Thread: Vbcr

Hybrid View

  1. #1
    Join Date
    Apr 2009
    Posts
    27

    Vbcr

    Being required to do everything the ".NET" way ... I was told that vbcr is soon going to be deprecated and is to be replaced by something else in the future ... anyhow even if vbcr does the job done for some reason they want the change now... they said we cannot use vbcr, vbcrlf,
    vbnewline ... and then when asked what then do we use? They say just go search ...

    I searched and all I can see is that the whole world seems to be still using vbcr ... they said MSDN
    has it but I end up going around in circles
    Any ideas?

    All help greatly appreciated

    Thanks,
    Matt

  2. #2
    Join Date
    Apr 2009
    Posts
    27

    Re: Vbcr

    They also mentioned that we cannot use \n escape sequence either (I dont know how to use that anyway in vb.net or if it is even possible) .. LOL

  3. #3
    Join Date
    Jan 2006
    Location
    Chicago, IL
    Posts
    14,999

    Re: Vbcr

    Those are VB6 keywords, deprecated into the new language. I doubt that will drop anytime soon, but there's no reason to use them.

    Take out the reference to the VB6 Runtime, and correct the errors. There is a newline command, and you can use string format commands
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  4. #4
    Join Date
    Aug 2005
    Posts
    198

    Re: Vbcr

    You were told wrong...

    For instance, 'Constants.vbTab' has no other sensible equivalent, unless you want a character - in that case it's 'ControlChars.Tab'.

    As dglienna said, you might want to use Environment.Newline, but in general the VB equivalents to the standard C-style control characters are the ones in the Constants class or the ControlChars class, both in the Microsoft.VisualBasic assembly.
    David Anton
    Convert between VB, C#, C++, & Java
    www.tangiblesoftwaresolutions.com
    Instant C# - VB to C# Converter
    Instant VB - C# to VB Converter

  5. #5
    Join Date
    Jan 2006
    Location
    Chicago, IL
    Posts
    14,999

    Re: Vbcr

    vbCrLf is the same as Chr$(13) & Chr$(10) (which does the same thing)
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  6. #6
    Join Date
    Apr 2009
    Posts
    27

    Smile Re: Vbcr

    I tried environment.newline and it worked like a charm .. thank you all so very much I really appreciate it.

    Matt

  7. #7
    Join Date
    Aug 2005
    Posts
    198

    Re: Vbcr

    Quote Originally Posted by dglienna View Post
    vbCrLf is the same as Chr$(13) & Chr$(10) (which does the same thing)
    That's why they came up with the Constants and ControlChars classes - this is a step forward from remembering the numbers (which you had to do in VB3 I believe).
    David Anton
    Convert between VB, C#, C++, & Java
    www.tangiblesoftwaresolutions.com
    Instant C# - VB to C# Converter
    Instant VB - C# to VB Converter

Tags for this Thread

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center