Visual Basic - Help displaying multiple items


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Visual Basic - Help displaying multiple items

Threaded View

  1. #1
    Join Date
    Aug 2013
    Posts
    1

    Exclamation Visual Basic - Help displaying multiple items

    This is my Code, and i have been trying to make thebutton so that it will automatically show everything from Mercury venus and etc and i have make it so that it show Mercury - Pluto in seperate lines but than i am not able to make it to show the name instead it only show String[]Array in every line any ideas how to fix it so that instead of string[]Array it will show each name correctly. Below is the picture attached as an example of how thefinal result will look like
    Code:
    Public Class Form1
     
        Private Sub btnShow_Click(sender As Object, e As EventArgs) Handles btnShow.Click
            'Number of planets before Pluto was "let go"
            Const intNUM_PLANETS As Integer = 9
            'Planet names
            Dim strArrayPlanetNames() As String =
            {"Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune", "Pluto"}
            'diameter of each planet in miles
            Dim dblArrayPlanetSizes() As Double =
            {3031, 7521, 7926, 4223, 88846, 74898, 31763, 30800, 1430}
            strArrayPlanetNames = {"Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune", "Pluto"}
     
            For intX = 0 To intNUM_PLANETS - 1
                'output name and size 
                lstPlanets.Items.Add(strArrayPlanetNames)
                'output bar chart on next line
            Next
        End Sub
     
    End Class
    Screenshot after button clicked.png
    Last edited by Hack; 08-21-2013 at 09:29 AM. Reason: Added Code Tags

Similar Threads

  1. Replies: 1
    Last Post: 09-18-2008, 08:34 AM
  2. Replies: 3
    Last Post: 11-09-2007, 07:32 AM
  3. Replies: 2
    Last Post: 12-11-2006, 11:56 AM
  4. Replies: 3
    Last Post: 03-02-2001, 04:06 AM
  5. Need help displaying few items at a time
    By computerdude7 in forum Web
    Replies: 1
    Last Post: 01-23-2001, 03:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center