If ListView1.SelectedItem.Text = "General" Then
call HideAllFrame
Frame1.Visible = True
end if

If ListView1.SelectedItem.Text = "Security" Then
call HideAllFrame
Frame2.Visible = True
end if

public sub HideAllFrame()
Frame1.Visible = False
Frame2.Visible = False
frame3.Visible = False
end sub

' Try to check the listview index. Did you assign the correct one?