Re: CR & Tab in VB 2005 Textbox




"Michel Posseth [MCP]" <MSDN@xxxxxxxxxxx> wrote in message news:uhjjQSDtHHA.3732@xxxxxxxxxxxxxxxxxxxxxxx

There is also a VBCRLF constant which can be used but is not really Dot.Net

Secondly (and gone if you use the above) the CStr is converting as you saw to a string with that value. I can only suggest that you don't use any of the old VB functions and go with straight Dot.Net. In the long run this will make things easier and more consistant.

Lloyd Sheen


Huh ???


Well read this

http://www.codeproject.com/useritems/novbruntimeref.asp

and read my responses

There is nothing old or outdated or whatever in the Microsoft Visual Basic .NET Runtime

Just my thoughts regarding this mather

regards

Michel Posseth



"Lloyd Sheen" <a@xxx> schreef in bericht news:466ED4E1-0A2E-47D8-B2F7-C9901223E1CC@xxxxxxxxxxxxxxxx

"AWW" wrote in message news:m2gl73171hmco6o06jj092nf87gs4fpqdu@xxxxxxxxxx
Using Textbox.Text = "123" & CStr(13) & "456"
I expect 2 lines on the screen but get 1 line with 13 in it.
It worked once in a RichTextBox but then stopped.
I just want to display aligned tabular data on the screen using CR &
Tabs to create data columns.
I am an old programmer but .Net novice.<g>
Help.

You may want to use the following constant under System.Environment

first is System.Environment.NewLine. This will ensure that you have the correct setting for the newline character (no matter where it runs).

There is also a VBCRLF constant which can be used but is not really Dot.Net

Secondly (and gone if you use the above) the CStr is converting as you saw to a string with that value. I can only suggest that you don't use any of the old VB functions and go with straight Dot.Net. In the long run this will make things easier and more consistant.

Lloyd Sheen




Sorry what I meant was to keep the code Dot.Net you would use the functions that are provide for each object. I do this since I use both VB and C# and sometimes I need to use code (not enough for a seperate assembly) and if I use the Dot.Net functions provided by the objects rather than the VB it is easier to convert since it is mostly getting rid of ending semi colons and changing square brackets into regular brackets (and the other stuff of course).

I just find that this way (even though VB will not disappear , and I bought a copy of VB1 in Long Beach the day it was first available so I have been using VB for quite some time (I guess that was 91)).

Just my 2 cents

Lloyd Sheen

.



Relevant Pages

  • Re: CR & Tab in VB 2005 Textbox
    ... Secondly the CStr is converting as you saw ... to a string with that value. ... There is also a VBCRLF constant which can be used but is not really ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Gremlin space in string data
    ... by default, when converting a number to a string, ... Strreturns a space as first character. ... Use CStr() instead. ...
    (microsoft.public.word.vba.general)
  • Re: CStr() vs. .ToString()
    ... As has been pointed out CStr is shorthand for CType(value, String). ... string may in fact be a different operation then the ToString method! ... | understand what Imports and Namespaces are and my students learn them. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Unicode String Parameters in DLLs
    ... > NOT Unicode, so you might have heard some stuff about that. ... > One thing to watch out for is if your DLL routine puts a zero byte at the ... > string ); it does not terminate the string. ... >> We are converting our application to work with Unicode. ...
    (microsoft.public.word.vba.general)
  • Re: error passing byte[] or strings of encrypted data to Web Service
    ... Converting Base64 should fix it. ... > this should be done automatically upon serialization by the proxy ... >> XML string is in fact a well-formed XML: ...
    (microsoft.public.dotnet.security)