by Bhuwan Chand Joshi (69 Submissions)
Category: Graphics
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 21st July 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
PictureBox, Image and Wang Image Edit Controls are used to display images like bmp, tif, jpg etc
'Using a picture box control
'Open a standard exe form
'Place a PictureBox control over the form
'Put a Command Button over the form
'Change the Caption property of the Command Button as LoadImage
'Write the code given below in the Click event of Command Button
Private Sub Command1_Click()
Picture1.Picture=LoadPicture("Path of the BMP File")
End Sub
'Run the form and Click on the Command Button displays image in the PictureBox Control.
*
'Using a wang image edit control
'Open a standard exe form.
'Place a Wang Image Edit Control control over the form by selecting from the component option
'Put a Command Button over the form
'Change the Caption property of the Command Button as LoadImage
'Write the code given below in the Click event of Command Button
Private Sub Command1_Click()
ImgEdit1.Image="Path of the BMP File"
ImgEdit1.Display
End Sub
'Run the form and Click on the Command Button displays image in the Wang Image Edit Control Control.
****
'Using a Image Control
'Open a standard exe form
'Place a Image control over the form
'Put a Command Button over the form
'Change the Caption property of the Command Button as LoadImage
'Write the code given below in the Click event of Command Button
Private Sub Command1_Click()
Image1.Picture=LoadPicture("Path of the BMP File")
End Sub
'Run the form and Click on the Command Button displays image in the Image Control.
No comments have been posted about PictureBox, Image and Wang Image Edit Controls are used to display images like bmp, tif, jpg etc. Why not be the first to post a comment about PictureBox, Image and Wang Image Edit Controls are used to display images like bmp, tif, jpg etc.