Still images can be Stretched to any extent in Visual Basic using the Tools in it. One such is the paintpicture method of the picture box.
Painpicture takes ten Arguments for its operation. They are:
10)Operation code to operate upon the Data being Copied.
Given Below is the code for Strecthing the Images in XY-Axis.Befor using the code set the Scalemode of both the Picture box to Pixel.Scalemode is a property which Defines the Unit of Measurement on a picturebox.
' code developed by Manikantan ' 3rd Agenda ' Site: www.3rdagenda.com ' The Piece of code Explains how to Produce Effects ' on Still Images ' to Do ..Place Two picture boxes in the form ' name them as pct_src and pct_dest ' Place a picture in the pct_src ' Have Two Command Buttons ' Name them as cmd_horiz and cmd_vert ' cmd_horiz has the code to stretch the image in the ' X axis ' cmd_vert has the code to stretch the image in the ' Y axis Private Sub cmd_horiz_Click() For i = 1 To pct_src.ScaleWidth pct_dest.PaintPicture pct_src.Picture, 0, 0, _ pct_dest.ScaleWidth, _ pct_dest.ScaleHeight, 0, 0, i, _ pct_src.ScaleHeight, vbSrcCopy Next i End Sub Private Sub cmd_vert_Click() For i = 1 To pct_src.ScaleHeight pct_dest.PaintPicture pct_src.Picture, 0, 0, _ pct_dest.ScaleWidth, _ pct_dest.ScaleHeight, 0, 0, _ pct_src.ScaleWidth, i, vbSrcCopy Next i End Sub