locked
Why it doesn't let me do this to my programm?? RRS feed

  • Question

  • This is the code!!!PLEASE HELP!!!!!
    Public Class Form1
        Dim Ρίζου, Ρίζου2, Σαγρή2, Ρίζου3, Μπλιούμης, Παπαχατζή, Σαγρή, Ξενοφώντας, Υποφενόμενη, Λιόντος, Τσολής, Πληροφορική, Καργιώτης, Μπιτούλα, Τασόκα As String
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            ListBox1.Items.Add("Ρίζου2")
            ListBox1.Items.Add("Ρίζου3")
            ListBox1.Items.Add("Μπλιούμης")
            ListBox1.Items.Add("Παπαχατζή")
            ListBox1.Items.Add("Σαγρή")
            ListBox1.Items.Add("Σαγρή2")
            ListBox1.Items.Add("Ξενοφώντας")
    
            ListBox2.Items.Add("Μπλιούμης")
            ListBox2.Items.Add("Υποφενόμενη")
            ListBox2.Items.Add("Λιόντος")
            ListBox2.Items.Add("Τσολής")
            ListBox2.Items.Add("Ρίζου")
            ListBox2.Items.Add("Πληροφορική")
            ListBox2.Items.Add("Πληροφορική")
    
            ListBox3.Items.Add("Λιόντος")
            ListBox3.Items.Add("Καργιώτης")
            ListBox3.Items.Add("Ρίζου")
            ListBox3.Items.Add("Μπλιούμης")
            ListBox3.Items.Add("Τασόκα")
            ListBox3.Items.Add("Υποφενόμενη")
            ListBox3.Items.Add("Μπιτούλα")
    
            ListBox4.Items.Add("Ρίζου2")
            ListBox4.Items.Add("Ρίζου3")
            ListBox4.Items.Add("Τσολής")
            ListBox4.Items.Add("Ξενοφώντας")
            ListBox4.Items.Add("Τασόκα")
            ListBox4.Items.Add("Ρίζου4")
            ListBox4.Items.Add("Μπιτούλα")
    
            ListBox5.Items.Add("Καργιώτης")
            ListBox5.Items.Add("Ρίζου2")
            ListBox5.Items.Add("Σαγρή")
            ListBox5.Items.Add("Υποφενόμενη")
            ListBox5.Items.Add("Σαγρή2")
            ListBox5.Items.Add("Παπαχατζή")
    
        End Sub
    
        Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
            Select Case ListBox1.SelectedIndex
                Case 0
                    Ρίζου2 = "Αρχαία"
                    Label7.Text = "Αρχαία"
                Case 1
                    Ρίζου3 = "εγχειρίδιο"
                    Label7.Text = "εγχειρίδιο"
                Case 2
                    Μπλιούμης = "Γεώμετρια"
                    Label7.Text = "Γεώμετρια"
                Case 3
                    Παπαχατζή = "Θρησκευτικά"
                    Label7.Text = "Θρησκευτικά"
                Case 4
                    Σαγρή = "Κείμενα"
                    Label7.Text = "Κείμενα"
                Case 5
                    Σαγρή2 = "Γλώσσα"
                    Label7.Text = "Γλώσσα"
                Case 6
                    Ξενοφώντας = "Αρχές Οικονομίας"
                    Label7.Text = "Αρχές Οικονομίας"
            End Select
        End Sub
    
        Private Sub ListBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox2.SelectedIndexChanged
            Select ListBox2.SelectedIndex
                Case 0
                    Μπλιούμης = "Γεωμετρία"
                    Label7.Text = "Γεωμετρία"
                Case 1
                    Υποφενόμενη = "Αγγλικά"
                    Label7.Text = "Αγγλικά"
                Case 2
                    Λιόντος = "Χημεία"
                    Label7.Text = "Χημεία"
                Case 3
                    Τσολής = "Φυσική"
                    Label7.Text = "Φυσική"
                Case 4
                    Ρίζου = "Ιστορία"
                    Label7.Text = "Ιστορία"
                Case 5
                    Πληροφορική = "Πληροφορική"
                    Label7.Text = "Πληροφορική"
    
    
    
    
        End Sub
    
    It Doesn't let me put cases for my listbox2!!!!!!!!!!What can i do???
    Sunday, October 4, 2009 8:52 PM

Answers

  • :-)
    This is not the correct forum to ask your question. I suppose there should be forums dedicated to problems regarding using Visual studio and VB.NET.

    Anyway I guess the problem is that you missing closing "End Select" key word in ListBox2_SelectedIndexChanged function. (Please note that I do not have VB.NET installed in this PC to test this)

    Best Regards,
    Aravinda D.P.

    P.S. A suggestion: Depending on your recent questions I answered I suggest you to read some entry level books/tutorials in msdn regarding programming with .NET languages and Visual Studio.
    • Marked as answer by propatzhs Monday, October 5, 2009 8:45 AM
    Monday, October 5, 2009 2:42 AM

All replies

  • :-)
    This is not the correct forum to ask your question. I suppose there should be forums dedicated to problems regarding using Visual studio and VB.NET.

    Anyway I guess the problem is that you missing closing "End Select" key word in ListBox2_SelectedIndexChanged function. (Please note that I do not have VB.NET installed in this PC to test this)

    Best Regards,
    Aravinda D.P.

    P.S. A suggestion: Depending on your recent questions I answered I suggest you to read some entry level books/tutorials in msdn regarding programming with .NET languages and Visual Studio.
    • Marked as answer by propatzhs Monday, October 5, 2009 8:45 AM
    Monday, October 5, 2009 2:42 AM
  • You know everything my friend...:)Don't be afraid to tell...:)THANKS
    Monday, October 5, 2009 8:45 AM