Asked By
anonymous
7060 points
N/A
Posted on - 04/07/2012
I need a picture in my active directory to be displayed in a picture or image box. However If it is large I want to Keep the size fixed on the screen
How to load picture on a picture box VB6.0
private sub cmdload _click()
Set picture1.picture= loadpicture(<”file name of the picture with the full path”>)
picture1.visible=true
end sub
The above code loads the picture with the given file name in the picture box.
However to make the size of the image constant,
we use Image box.
private sub cmdload _click()
Image1.Stretch=true.
Set Image1.picture= loadpicture(<”file name of the picture with the full path”>)
Image1.visible=true
end sub
You can specify any URL, the ftp:// format of the internet is also supported.
You can also try the above by trying the properties of the picture box or Image box in the IDE by selecting a file as described by the Open file dialog box, inbuilt in the IDE.
You can use all format of image files like jpg, jpeg, gif, bmp, logo, patches, all that are required and used to be recognized by windows.
The picture box provides utilities unlike an image box. The picture box can be used to manually edit the image and then save it. You can build a paint program through Picture Box.
Thanks
Please leave a comment.