Re: CR & Tab in VB 2005 Textbox
- From: "Lloyd Sheen" <a@xxx>
- Date: Thu, 21 Jun 2007 14:54:34 -0400
"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@xxxxxxxxxxUsing 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
.
- Follow-Ups:
- Re: CR & Tab in VB 2005 Textbox
- From: \(O\)enone
- Re: CR & Tab in VB 2005 Textbox
- From: Michel Posseth [MCP]
- Re: CR & Tab in VB 2005 Textbox
- References:
- Re: CR & Tab in VB 2005 Textbox
- From: Michel Posseth [MCP]
- Re: CR & Tab in VB 2005 Textbox
- Prev by Date: Re: CR & Tab in VB 2005 Textbox
- Next by Date: Crashes when using autocomplete
- Previous by thread: Re: CR & Tab in VB 2005 Textbox
- Next by thread: Re: CR & Tab in VB 2005 Textbox
- Index(es):
Relevant Pages
|