VBSlip 4_2_2015-16


=================================Slip 4_2=============================================
Design an application in VB which has a Drivelistbox, Dirlistbox, Filelistbox control. =====================================================================================
 


Private Sub Dir1_Change()
                File1.Path = Dir1.Path
End Sub

Private Sub Drive1_Change()
                Dir1.Path = Drive1.Drive
End Sub

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
                If Button AndvbRightButton Then

                                PopupMenumnuMenu
                End If
               
End Sub

Private Sub mnuAll_Click()
                File1.Pattern = "*.*"
                For i = 0 To File1.ListCount - 1
                                lstResult.AddItemFile1.List(i)
                Next
End Sub

Private Sub mnuAllBitmap_Click()
                File1.Pattern = "* .bmp"
                For i = 0 To File1.ListCount - 1
                                lstResult.AddItemFile1.List(i)
                Next
End Sub

Private Sub mnuAllDoc_Click()
                File1.Pattern = "* .doc"
                For i = 0 To File1.ListCount - 1
                                lstResult.AddItemFile1.List(i)
                Next
End Sub
 

1 comment:

Note: only a member of this blog may post a comment.