I have a listview1 and below it i have a frame. Inside that frame i have a few controls such as textbox,web browser control,listview and button. My intention is to make the frame invisible when user haven't selected a row in listview1 both using right click or left click over listview row. However, using the code below i am facing a few problems:
1)the left click never works.if i left click over row nothing happens(frame doesn't become visible) .If i left click on the white area of listview the frame does become invisible!!( Note: right click works in make frame visible and invisible)
2)Both left click and right click doesn't un highlight the selected listview row.
Furthermore, i want to reload web browser and listview inside the frame on click of listview1 row .I be happy if some one help me fix these problem.Thanks
1 Code:
Private Sub ListView1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single) Dim lvwItem As ListItem If Button = vbRightButton Then Set lvwItem = ListView1.HitTest(x, y) If Not lvwItem Is Nothing Then Frame1.Visible = True lvwItem.Selected = True PopupMenu mnuEdit Else Frame1.Visible = False End If End If End Sub




Reply With Quote