SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Wizard Blake Tallos's Avatar
    Join Date
    Jun 2008
    Location
    Cuyahoga Falls, Ohio.
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Line breaks in BASIC! (Help!)

    Ok -
    I'm writing a program in Visual Basic that will tell you the name, age, hair color, eye color and how many pets they own.

    But i'm stuck on one problem though. Creating new lines in a program. Does anyone on here know how to create a new line within in the program using Visual Basic?

    Heres an example of the program



    Code:
    'Write a program that will tell you the name, age, hair color, eye color and to ask them how many pets they own
    TextWindow.WriteLine("What is your name?")
    name =TextWindow.Read()
    TextWindow.Write("Awesome, your name is " + name + ".") 
    TextWindow.Write("So," + name + " im going to ask you a couple of questions about yourself, is that ok?")
    Blake Tallos - Software Engineer for Sanctuary
    Software Studio, Inc. C# - Fanatic!
    http://www.sancsoft.com/


  2. #2
    SitePoint Wizard
    Join Date
    Mar 2008
    Posts
    1,149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    TextWindow.Write("On one line" & Environment.NewLine & "and on another?")
    Haven't touched .NET in a few years.

    Or is this not .NET? Can't even tell!

    Code:
    TextWindow.Write("On one line" & vbCrLf & "and on another?")
    Or maybe it's vbCr and vbLf separately. Now that's something I haven't touched in forever.


Bookmarks

Posting Permissions

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