VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Load the Picture from one control to another control

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)

Load the Picture from one control to another control

Rate Load the Picture from one control to another control




'Loading Picture from PictureBox control to Image Control:

'Open a standard exe form

'Place a PictureBox control over the form

'Place a Image control over the form

'Put a two command button over the form with caption property as  LoadImage1 and LoadImage2

'Clicking on LoadImage1 load the picture into the PictureBox control

'Clicking on LoadImage2 load the picture into the Image Control

'First click the LoadImage1 command button because PictureBox Control is the source of Image Control

Private Sub Command1_Click()

Picture1.Picture=LoadPicture("Path of the BMP file")

End Sub

Private Sub Command2_Click()

Image1.Picture=Picture1.Picture

End Sub



'Load Picture from Image control to Picture Box control:

'Open a standard exe form

'Place a PictureBox control over the form

'Place a Image control over the form

'Put a two command button over the form with caption and name property as  LoadImage1 and LoadImage2

'Clicking on LoadImage1 load the picture into the Image control

'Clicking on LoadImage2 load the picture into the Picture Box Control

'First click the LoadImage1 command button because Image Control is the source of Picture Box Control

Private Sub Command1_Click()

Image1.Picture=LoadPicture("Path of the BMP file")

End Sub

Private Sub Command2_Click()

Picture1.Picture=Image1.Picture

End Sub

'Now both the control shows the same picture.



Download this snippet    Add to My Saved Code

Load the Picture from one control to another control Comments

No comments have been posted about Load the Picture from one control to another control. Why not be the first to post a comment about Load the Picture from one control to another control.

Post your comment

Subject:
Message:
0/1000 characters