当前位置:编程学习 > C#/ASP.NET >>

求助高手 c#做一个winform界面放大的功能 有什么好的方法或者思路?

求助高手 c#做一个winform界面放大的功能 有什么好的方法或者思路? --------------------编程问答--------------------
    public partial class Form1 : Form
    {
        Bitmap memBitmap = new Bitmap(60, 40);
        public Form1()
        {
            this.Move += delegate { this.Invalidate(); };
            this.SizeChanged += delegate { this.Invalidate(); };
        }
        protected override void OnPaint(PaintEventArgs e)
        {
            using(Graphics g = Graphics.FromImage(memBitmap))
            {
                Point topLeft = this.Location; topLeft.Offset(-memBitmap.Width, -memBitmap.Height);
                g.CopyFromScreen(topLeft, Point.Empty, memBitmap.Size);
            }
            e.Graphics.DrawImage(memBitmap, this.ClientRectangle, 0, 0, memBitmap.Width, memBitmap.Height, GraphicsUnit.Pixel);
        }
    }


要专业级的,看微软的Magnification API以及SDK下的MagSample例子。 --------------------编程问答-------------------- wPF 去做
--------------------编程问答-------------------- DrawImage的重载。
把要放大的图作为原图,绘制到要放大的地方去,
调整两个rectangle参数。 --------------------编程问答-------------------- 界面放大?窗体放大?this.WindowState = FormWindowState.Maximized;?
补充:.NET技术 ,  C#
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,