How to enlarge image in picturebox in vb.net?

1) Drag and Drop PictureBox to Label: First, you must set the AllowDrop property of the label to True (can also be done in designer): Label. AllowDrop = True Handle PictureBox. MouseDown to activate DragDrop: Private Sub PictureBox1_Click(ByVal sender As Object, ByVal e As System.

EventArgs) _ Handles PictureBox1. MouseDown PictureBox1. DoDragDrop(PictureBox1, DragDropEffects.

All) End Sub Now, handle the DragEnter and DragDrop events of the Label: Private Sub Label1_DragDrop(ByVal sender As Object, _ ByVal e As System.Windows.Forms. DragEventArgs) Handles Label1. DragDrop 'Get the data being dropped from e.

Data and do something. End Sub Private Sub Label1_DragEnter(ByVal sender As Object, _ ByVal e As System.Windows.Forms. DragEventArgs) Handles Label1.

DragEnter 'e. Effect controls what type of DragDrop operations are allowed on the label. 'You can also check the type of data that is being dropped on the label here 'by checking e.Data.E.

Effect = DragDropEffects. All End Sub 2)Enlarge the PictureBox on MouseOver: Create a new Form with only a PictureBox on it. This is the form we will show when we want to show an enlarged image, lets call it Form2.

Now simply handle the MouseHover event of the thumbnail picture box: Private Sub PictureBox1_MouseHover(ByVal sender As Object, _ ByVal e As System. EventArgs) Handles PictureBox1. MouseHover 'PictureBox1 is the thumbnail on the original form.'PictureBox2 is the full size image on the popup form.

Form2. PictureBox2. ClientSize = PictureBox1.Image.

Size Form2. PictureBox2. Image = CType(PictureBox1.Image.

Clone, Image) Form2.ShowDialog() End Sub You will need to play around with how you want to dispose of the popup form.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions