(Refer Copies files from one location to other also)
A) Program Design :
(B) Property(Controls Used) :
- DirListBox
- DriveListBox
- FileListBox (Pattern Property - *.txt;*.ini)
- RichTextBox (Is obtained by taking Project-->Components-->Microsoft Rich Text Control 6.0
(C) Attaching Code to the Object :
Dim fname As String |
Private Sub Dir1_Change() File1.Path = Dir1.Path End Sub |
Private Sub Drive1_Change() Dir1.Path = Drive1.Drive End Sub |
Private Sub File1_Click() If Dir1.Path = Drive1.Drive & "\" Then fname = File1.Path & File1.List(File1.ListIndex) Else fname = File1.Path & "\" & File1.List(File1.ListIndex) End If RichTextBox1.LoadFile fname End Sub |
Private Sub Form_Load() Drive1.Drive = "c:\" Dir1.Path = Drive1.Drive & "windows" File1.Path = Dir1.Path End Sub |
(C) Output :
====================================================================
No comments:
Post a Comment