i'm currently building an app with vb.net
and i'm having some problems with a listview and item activation, i don't understand the mechanics of it
what i want is to double click on an listview item and show a form
i've been searching in msdn but i don't seem to understand how it works
any help would be appreciated

help with listview
bforst
Simeao
In listview, Me.Listview1.selectedIndices(0) only return an Integer that if you set multi-select = False.
Or else, you might have to use looping to get the Indices that were selected.
Private Sub ListView1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ListView1.MouseDown If e.Clicks = 2 AndAlso Me.ListView1.SelectedItems.Count > 0 Then
MsgBox(
Me.ListView1.Items(Me.ListView1.SelectedIndices(0)).Text) End If End Subvishwas_udy
your code is a big help, but i have a problem with it
i've trying variations of your code and i'm stuck...........
if i try this, only the first part of the code runs, so to say only formopenemp is opened, the second form doesn't, it opens only the first form
If e.Clicks = 2 AndAlso Me.ListViewcons.Items(0).Text Is "Abrir" Then
Dim openemp As New Formopenemp()
openemp.MdiParent = Formopenemp.ActiveForm
openemp.Show()
ElseIf e.Clicks = 2 AndAlso Me.ListViewcons.Items(1).Text = "Criar" Then
Dim cremp As New Formcreatedbemp()
cremp.MdiParent = Formcreatedbemp.ActiveForm
cremp.Show()
end if
any help would be appreciated
Sudheer_sgk
Because you are trying to do it in MDI. You can't use "Is" in here. You have to use "="
If e.Clicks = 2 AndAlso Me.ListView1.SelectedItems.Count > 0 Then If UCase(Me.ListView1.Items(Me.ListView1.SelectedIndices(0)).Text) = "1" Then Dim a As New Form2a.MdiParent = a.ActiveForm
a.Show()
ElseIf UCase(Me.ListView1.Items(Me.ListView1.SelectedIndices(0)).Text) = "2" Then Dim b As New Form3b.MdiParent = b.ActiveForm
b.Show()
End If End If