Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = vbRightButton Then PopupMenu popmnu End If End Sub
最后,编码以响应菜单事件
Private Sub mnuD_Click() ExplorerList1.View = 3 '详细信息 End Sub
Private Sub mnuL_Click() ExplorerList1.View = 2 '列表 End Sub
Private Sub mnuN_Click() ExplorerList1.View = 1 '图标 End Sub
Private Sub mnuS_Click() ExplorerList1.View = 0 '平铺 End Sub