1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Development Visual Basic --- New Line

Discussion in 'Software' started by zerokool04, 8 Mar 2005.

  1. zerokool04

    zerokool04 What's a Dremel?

    Joined:
    5 Oct 2004
    Posts:
    97
    Likes Received:
    0
    Hi,
    I am trying to put text on to a new line in a text box using visual basic 6.
    Does anyone know the function you would use to do this.
    Thanks
     
  2. DeX

    DeX Mube Codder

    Joined:
    22 Jul 2002
    Posts:
    4,152
    Likes Received:
    3
    Text1.Text = "This is on line 1" & vbCrLf & "and this is on line 2."

    ;)

    Oh and make sure the TextBox's Multiline property is set to true.
     
  3. [->>Curly<<-]

    [->>Curly<<-] What's a Dremel?

    Joined:
    12 Jun 2004
    Posts:
    99
    Likes Received:
    0
    also


    Text1.Text = "This is on line 1" & vbnewline & "and this is on line 2."
     
  4. Jamie

    Jamie ex-Bit-Tech code junkie

    Joined:
    12 Mar 2001
    Posts:
    8,180
    Likes Received:
    54
    You mean you can't use \n in vb? :hehe:
     
  5. TheAnimus

    TheAnimus Banned

    Joined:
    25 Dec 2003
    Posts:
    3,214
    Likes Received:
    8
    nope, strings arent parsed like that !

    "\\" would be too confusing to be represent a single \ to newbies so i guess i can see why, i still hate the fact it misses that,

    another pate hate
    () for functions AND arrays, i MEAN FFS!

    OPTION EXPLICIT should be on always

    __ASM needs to be implemented. (rather than movememory etc with the OP codes :wallbash: how else can you outp!)

    needs to sort out if its going to be object orientated or not, the whole new syntax needs work.

    but .net isn't *that* bad, i still like the IDE slightly better in code editor mode, the way you can attach to an event so few keystrokes.
     
  6. RTT

    RTT #parp

    Joined:
    12 Mar 2001
    Posts:
    14,120
    Likes Received:
    74
    I had to use vb.net last semester and it didn't turn out to be quite as bad as I imagined it would be. The syntax makes you do stupid mistakes when you get back to writing in any other "proper language" though. Oh, and the object model is utter vomit :D
     
  7. Hepath

    Hepath Minimodder

    Joined:
    20 Oct 2003
    Posts:
    730
    Likes Received:
    0
    Dunno how this thread turned into a .Net one :confused:

    But I agree with RTT in that VB6 is a little unintuitive is some of its syntax especially from a pure VB6 background. But it's really just a nomencalture thing (ooh big word for this time of the morning!)

    I dont know were TheAnimus is coming with his OO comment. I don't think you'll find the intent of the CLR Libraries was to be OO per se, just a serires of reuseable classes in the same way MS did the MFC classes. Actually... take that back MFC was incredibly bloated!

    My pet rant is that the project options across the languages are all specific to the language and are based on the old project options from previous IDEs - e.g. VB.NET options are a rip off from the VB6 compiler options, just as C# class libraries... So for example I can have post and pre build steps in a C# project but not VB6... Web based projects are geared up for always compiling to a bin directory which is also pants (again no pre/post build steps!)

    Ohh.... and to answer the original question in a .NET way: "Environment.NewLine" though VB projects are often upgrades interop to VB6 allowing those already mentioned to be used (should be discouraged though! )
     

Share This Page