Results 1 to 4 of 4

Thread: Help Useing Label control to display multiple calculations

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2015
    Posts
    3

    Help Useing Label control to display multiple calculations

    I am just beginng VB and im working on a calculator applicantion that needs to display the result of multiple calculations all in one big text box and label what each result means. I cannot get anything to display in the box, could somebody please help me out here. Thank you.

  2. #2
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,181

    Re: Help Useing Label control to display multiple calculations

    The first thing you need to do is post your code. We can't help correct the errors f we can't see what you've done.

  3. #3
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    25,458

    Re: Help Useing Label control to display multiple calculations

    Code:
    TextBox1.Text = "line 1" & Environment.NewLine
    TextBox1.Text &= "line 2" & Environment.NewLine
    TextBox1.Text &= "line 3"
    
    Dim number As Integer = 42
    Dim result As String = "The ultimate answer is " & Cstr(number)
    
    TextBox1.Text &= Environment.NewLine & Environment.NewLine & result
    Your TextBox should display this:

    line 1
    line 2
    line 3

    The ultimate answer is 42

  4. #4

    Thread Starter
    New Member
    Join Date
    Jul 2015
    Posts
    3

    Re: Help Useing Label control to display multiple calculations

    Quote Originally Posted by .paul. View Post
    Code:
    TextBox1.Text = "line 1" & Environment.NewLine
    TextBox1.Text &= "line 2" & Environment.NewLine
    TextBox1.Text &= "line 3"
    
    Dim number As Integer = 42
    Dim result As String = "The ultimate answer is " & Cstr(number)
    
    TextBox1.Text &= Environment.NewLine & Environment.NewLine & result
    Your TextBox should display this:

    Thank you!! this is exactly what I needed!

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
  •  



Click Here to Expand Forum to Full Width