How to hide frame when clicking on white area of listview where there is no data?
Visual Basic
1
Posts
1
Posters
3
Views
1
Watching
-
I have frame and listview1. I want to hide the frame when i click(left click or right click) on white area of listview1 where is there is no data (As shown in attched pic).could any one show me how this can be done?Thanks
Private Sub ListView1_Click() gstrSomething = ListView1.SelectedItem.SubItems(4) gstrSomethingElse = ListView1.SelectedItem.Text Frame1.Visible = True End Sub 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