Graphics.DrawImage 方法 (Image, Rectangle)  [Visual Basic]请参见
Graphics 类 | Graphics 成员 | System.Drawing 命名空间 | Graphics.DrawImage 重载列表 
要求
平台: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows .NET Server family
语言
C#C++JScriptVisual Basic全部显示
在指定位置并且按指定大小绘制指定的 Image 对象。[Visual Basic]
<ComVisible(False)>
Overloads Public Sub DrawImage( _
   ByVal image As Image, _
   ByVal rect As Rectangle _
)
[C#]
[ComVisible(false)]
public void DrawImage(
   Image image,
   Rectangle rect
);
[C++]
[ComVisible(false)]
public: void DrawImage(
   Image* image,
   Rectangle rect
);
[JScript]
public
   ComVisible(false)
function DrawImage(
   image : Image,
   rect : Rectangle
);
参数
image 
要绘制的 Image 对象。 
rect 
Rectangle 结构,它指定所绘制图像的位置和大小。

解决方案 »

  1.   

    放一个控件,然后指定rect 为 控件名.ClientRecangle
      

  2.   

    gl.ScaleTransform(float width,float height);
    width是宽度缩放因子,height是高度缩放因子,它们可以
    通过用窗口客户区的Width和Height属性分别除以bmp的Width和
    Height属性的得到.大概思路就是这样,具体实现自己想
      

  3.   

    //这样应该可以了吧using System;
    using System.Drawing;
    using System.Windows.Forms;public class Form1 : Form
    {
    Bitmap image; public Form1()
    {
    ResizeRedraw = true;
    } protected override void OnPaint(PaintEventArgs pea)
    {
    image = new Bitmap(@"E:\SOURCE\C#\12345.jpg");
    Graphics grfx  = pea.Graphics;
    SizeF    sizef = grfx.VisibleClipBounds.Size;
    grfx.DrawImage(image, 0, 0, (int)sizef.Width, (int)sizef.Height);
    } public static void Main()
    {
    Application.Run(new Form1());
    }
    }
      

  4.   

    公司这几天网坏了,上不了.十分感谢,有点头绪了,可你下面的例子没用到ScaleTransform??
    有没这方面的资料研究一下!
      

  5.   

    DrawImage自动完成缩放
    不需要ScaleTransform
      

  6.   

    我开始没有认真想,用以上的方法更简单:)你可以参考《C# Windows 程序设计》
    里面有关于这方面的资料,一章~
      

  7.   

    如果我要放大,缩小,旋转,平移?改如何做呢??
    还望大家不吝赐教!Bitmap bmp = new Bitmap(200,200);
    Graphics g1= Graphics.FromImage(bmp);
    画图语句
    p1.Image =bmp;
    p1      //pictureBox
    然后我想完成这些 放大,缩小,旋转,平移 功能,希望大家能给点意见与例子。谁帮我找到好的方案,我另加贴子单独送分200。
      

  8.   

    http://www.codeproject.com/cs/media/quickview.asp?target=image%7Cviewer
    参考一下这个吧
    我要睡觉了,明天还要早读,呜呜~~