Sunteți pe pagina 1din 4

TITLE: CREATE THE BROWSER PROGRAM

OBJECTIVES:

1. Add control
2. Write the program code
3. Run the program

TOOLS, EQUIPMENT AND MATERIALS:-

1. Visual Basic Software


2. Computer

PROCEDURE:

1. Add controls to the form.

a) New Project is click on File menu and then, OK was click to create a new standard
executable file.
b) Option is click on the Tools menu, and then the Editor tab was click. And if the
Require Variable Declaration box appears, remove the check mark by click the box.
c) The size of the form is increate to hold the file system controls and is a good sized to
viewing the image.
d) The DriveListBox control in the toolbox is click.
e) The mouse pointer is move to the upper left corner of the form, and then a drive list
box is draw.
f) The DriveListBox control in the toolbox is click, and then a directory list box is
added to the form, that is below the drive list box.
g) The FileListBox control in the toolbox is click, and then a file list box is added to the
form. Its allowed at least four or filenames to be display.
h) The image control in toolbox is click, and then a large image box is added to the
form, to the right drives, directories and the file boxes.
i) The following properties is set by using the Properties window:
Object Property Setting
File1 Pattern *.bmp;wmf;.ico
Image1 Stretch True
BorderStyle 1– Fixed Single

2. Write the program code.

a) The driver list box object on the form is double click.


b) The following program statement is type between the Private Sub and End Sub
statement is type in the Drive1_Change event procedure:

Dir1.Path = Drive1.Drive

c) The Code window is close (click the close button in the upper right corner)
d) The directory list box on the form is double-click and the following program
statement is add to the Dir1_Change event procedure:

File1.Path = Dir1.Path

e) The Code window is close.


f) The file list box on the form is double-click and the following code is add to the
File1_Click event procedure:

SelectedFile – File1.Path & “\” & File1.FileName


Image1.Picture = LoadPicture(SelectedFile)

3. Run the browser program.

a) The start button on the toolbar is click.

b) The folder \ Microsoft Office \ Office11 is open by using the directory list box.

c) The filename msn.ico is click.


d) The list is scroll down and the poundbag.wmf filename is clicked.
e) The drive, directory and filename list boxes is use to view other bit maps, Windows
metafiles, and icons on the system.
f) The program is save and saved it to a disk.
g) The close button on the form is click.
h) The form and project is save as My Browser in the folder TKK2401
RESULT:
CONCLUSION:

With Visual Basic, a browser program has been created”. The project uses only drive
list box control, directory list box , file list box and image control. The drive list box
show the drive that use in computer. The directory list show the folder or file that contain
in the drives. The file list box show the file from the dir. List. The image box will show
the file or image click from the file list.

S-ar putea să vă placă și