10-04-2017, 08:05 PM
Aim : To develop an Activex control document and perform the various file operations on it.
Algorthm :
1. Create a new Activex control document in Visual Basic
2. Add the drive list, directory list and file list controls from the toolbox
3. Also add three textboxes correspondingly
4. Click on File -> make project1. ocx and specify the required name and location
5. Double click on each control to add the respective coding
6. click on debug-> start to execute the application
Program
FILE OPERATIONS USING ACTIVEX CONTROL
Code:
Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub
Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub
Private Sub File1_Click()
Text1.Text = File1.Path
End Sub
Private Sub Dir1_Click()
Text2.Text = Dir1.FontName
Text3.Text = Dir1.ListIndex
End Sub