- Home
·
- Graphics
·
- Use PictureBox, Image Control to save images in a directory
Use PictureBox, Image Control to save images in a directory
Use PictureBox, Image Control to save images in a directory
Rate Use PictureBox, Image Control to save images in a directory
(1(1 Vote))
'Open a standard exe form.
'Place a PictureBox control over the form
'Put a Two Command Button over the form
'Change the Caption property of the Command Buttons as LoadImage and SaveImage
'Write the code given below in the Click event of Command Button
'First click the LoadImage button to load the image and then Click SaveImage to save the Image.
Private Sub Command1_Click()
Picture1.Picture=LoadPicture("Path of the BMP File")
End Sub
Private Sub Command2_Click()
SavePicture Picture1, "Path where you need to save the image Loaded into the picture box "
End Sub
'Open a standard exe form
'Place a Image control over the form
'Put a Two Command Button over the form
'Change the Caption property of the Command Buttons as LoadImage and SaveImage
'Write the code given below in the Click event of Command Button
'First click the LoadImage button to load the image and then Click SaveImage to save the Image.
Private Sub Command1_Click()
Image1.Picture=LoadPicture("Path of the BMP File")
End Sub
Private Sub Command2_Click()
SavePicture Image1, "Path where you need to save the image Loaded into the picture box "
End Sub
'Example
'Load Picture into the PictureBox Control
'Load the picture Old.bmp in the PictureBox Control
Private Sub Command1_Click()
Picture1.Picture=LoadPicture("D:\Old.bmp")
End Sub
'Save Picture into the Specified Directory with the new name
Private Sub Command2_Click()
SavePicture Picture1,"D:\New.bmp"
End Sub
'Now the directory consists of same images with two different names Old.bmp and New.bmp
'You can use the utility to save images in your system anywhere using Picture controls.
Use PictureBox, Image Control to save images in a directory Comments
No comments yet — be the first to post one!
Post a Comment