|Visual Basic (Declaration)|
|Visual Basic (Usage)||Copy Code|
Dim instance As ImImage Dim hDC As System.IntPtr Dim dstRect As System.Drawing.Rectangle instance.Draw(hDC, dstRect)
- The handle to the Device Context on which to draw the image
- The coordinates of the rectangle where the image will be drawn
Since StretchDIBits is used to do the drawing the image will be less then optimally displayed if the image is of a different size than the Graphics drawing surface. The Winforms control will scale the image to the surface prior to displaying it. This will lead to much better results.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2