-
January 17th, 2007, 03:47 PM
#16
Re: Zoom in & out of an Image within a PictureBox
Okay i've been playing a little with this code and i found something very interesting..
the picturebox control's paintpicture method has just about what your looking for...
Originally Posted by VB Books Online
Syntax
object.PaintPicture picture, x1, y1, width1, height1, x2, y2, width2, height2, opcode
The PaintPicture method syntax has these parts:
Part Description
object: Optional. An object expression that evaluates to an object in the Applies To list. If object is omitted, the Form object with the focus is assumed to be object.
Picture: Required. The source of the graphic to be drawn onto object. Must be the Picture property of a Form or PictureBox.
x1, y1: Required. Single-precision values indicating the destination coordinates (x-axis and y-axis) on object for picture to be drawn. The ScaleMode property of object determines the unit of measure used.
Width1: Optional. Single-precision value indicating the destination width of picture. The ScaleMode property of object determines the unit of measure used. If the destination width is larger or smaller than the source width (width2), picture is stretched or compressed to fit. If omitted, the source width is used.
Height1: Optional. Single-precision value indicating the destination height of picture. The ScaleMode property of object determines the unit of measure used. If the destination height is larger or smaller than the source height (height2), picture is stretched or compressed to fit. If omitted, the source height is used.
After all this it might not take that much to add this funtionability to a picturebox...
More when i'm done...
Gremmy..
Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
WPF Articles : 3D Animation 1 , 2 , 3
Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|