Home » Category » Microsoft Visual Basic

Microsoft Visual Basic: Zoom picture box sample code

100| Sun, 16 Dec 2007 22:41:00 GMT| laukoksoon| Comments (3)
hi all : any idea on how to zoom in / out picture box sample code in vb.net ?

Keywords & Tags: zoom, picture, box, sample, code, microsoft, visual basic, vb

URL: http://www.programmerbase.com/visual-basic/560769/
 
«« Prev - Next »» 3 helpful answers below.

rgerbig | Sun, 09 Sep 2007 22:24:00 GMT |

If you are using VS05 the picturebox control has a zoom property setting for the size mode property.

me.picturebox1.sizemode = Zoom

then



Private Sub DoZOOM(ByVal zoom As Integer)

Try

Select Case zoom

Case Is = 0

Me.PBX.Height = m_CurrentPic.OriginalHeight

Me.PBX.Width = m_CurrentPic.OriginalWidth

Case Is <> 0

Me.PBX.Height = m_CurrentPic.OriginalHeight + (zoom)

Me.PBX.Width = m_CurrentPic.OriginalWidth + (zoom)

End Select

Me.PBX.Refresh()

CenterPBX()

Catch ex As Exception

End Try


the above code is taken from a custom control that i created-m_CurrentPic is the currently loaded image. WHen the property is set to zoom...the resizing of the control zooms the image.

dman1 | Sun, 09 Sep 2007 22:25:00 GMT |

but the problem is : i am using vs.net 2003

laukoksoon | Sun, 09 Sep 2007 22:26:00 GMT |

Microsoft Visual Basic Hot Answers

Microsoft Visual Basic New questions

Microsoft Visual Basic Related Categories