BMP Viewer

This program is to view graphics in bmp(bitmap) format. You need to draw a picture box, a drive list box , a directory list box and a command button.

The source code
 

Private Sub Command1_Click( )

If Right(File1.Path,1)<>"\" Then

filenam=File1.Path+"\"+File1.FileName
Else
filenam=File1.Path+File1.FileName

End If

Picture1.Picture=LoadPicture(filenam)

End Sub

Private Sub Dir1_Change( )

File1.Path=Dir1.Path
File1.Pattern=("*.bmp")

End Sub

Private Sub Drive1_Change( )

Dir1.Path=Drive1.Drive

End Sub

 

[Back to Sample Page]