Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
    If ListBox1.SelectedItem IsNot Nothing Then
        Timer1.Enabled = False
    Else
        Timer1.Enabled = True
    End If
End Sub

Edited 4 Years Ago by gozo12: edit

i tried this but its always gives false reslut please help me D:

        If ListBox1.Items.Count > 0 Then
            Me.Text = "i select empty part of listbox = falsee"
        Else
            Me.Text = "true"
        End If

You mark this thread as solved but you ask a help??

but it always make timer1.enalbe true

Your first code is working. you just need select the item on listbox to get timer enable as False.

i tried this but its always gives false reslut please help me D:
If ListBox1.Items.Count > 0 Then
Me.Text = "i select empty part of listbox = falsee"
Else
Me.Text = "true"
End If

I don't get what you want in your second code. If your listbox is fill with an items then this code will always return False. Even you select an empty part of listbox.

Edited 4 Years Ago by Jx_Man: add quote

This question has already been answered. Start a new discussion instead.