资源简介

GDI+鼠标绘制常规图形平衡缩放DEMO,使用C#语言,附有全部源码。可以进行点、线、多边形、圆、椭圆、弧线还有文本等等的绘制,以及撤销、刷新、删除等功能,是个比较好的示例。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication1
{
    public partial class Anteprima : Form
    {
        public Anteprima()
        {
            InitializeComponent();
        }

        private void toolStripButton1_Click_1(object sender EventArgs e)
        {
            this.Close();
        }

        private void toolStripButton2_Click(object sender EventArgs e)
        {
            this.docToPrint.Print();
        }

        private void Anteprima_Load(object sender EventArgs e)
        {

        }

        private void Anteprima_Resize(object sender EventArgs e)
        {
            this.PrintPreviewControl1.Width = this.Width - 10;
            this.PrintPreviewControl1.Height = this.Height - this.toolStrip1.Height - 37;

        }

        private void toolStripMenuItem2_Click(object sender EventArgs e)
        {
            this.PrintPreviewControl1.Zoom = (float)System.Convert.ToDouble(toolStripMenuItem2.Text) / 100;
        }

        private void toolStripMenuItem3_Click(object sender EventArgs e)
        {
            this.PrintPreviewControl1.Zoom = (float)System.Convert.ToDouble(toolStripMenuItem3.Text) / 100; 
        }

        private void toolStripMenuItem4_Click(object sender EventArgs e)
        {
            this.PrintPreviewControl1.Zoom = (float)System.Convert.ToDouble(toolStripMenuItem4.Text) / 100; 
        }

        private void toolStripMenuItem5_Click(object sender EventArgs e)
        {
            this.PrintPreviewControl1.Zoom = (float)System.Convert.ToDouble(toolStripMenuItem5.Text) / 100; 
        }

        private void toolStripMenuItem6_Click(object sender EventArgs e)
        {
            this.PrintPreviewControl1.Zoom = (float)System.Convert.ToDouble(toolStripMenuItem6.Text) / 100; 
        }

        private void toolStripMenuItem7_Click(object sender EventArgs e)
        {
            this.PrintPreviewControl1.Zoom = (float)System.Convert.ToDouble(toolStripMenuItem7.Text) / 100; 
        }

        private void toolStripMenuItem8_Click(object sender EventArgs e)
        {
            this.PrintPreviewControl1.Zoom = (float)System.Convert.ToDouble(toolStripMenuItem8.Text) / 100; 
        }

        private void PrintPreviewControl1_MouseMove(object sender MouseEventArgs e)
        {
           
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2020-03-08 13:23  source\
     目录           0  2020-03-08 13:23  source\.vs\
     目录           0  2020-03-08 13:23  source\.vs\WindowsApplication1\
     目录           0  2020-03-08 13:23  source\.vs\WindowsApplication1\v14\
     文件       16384  2009-10-31 15:08  source\.vs\WindowsApplication1\v14\.suo
     目录           0  2020-03-08 13:23  source\_UpgradeReport_Files\
     文件        3348  2009-06-24 11:09  source\_UpgradeReport_Files\UpgradeReport.css
     文件       12505  2008-01-11 01:25  source\_UpgradeReport_Files\UpgradeReport.xslt
     文件          69  2009-06-24 11:09  source\_UpgradeReport_Files\UpgradeReport_Minus.gif
     文件          71  2009-06-24 11:09  source\_UpgradeReport_Files\UpgradeReport_Plus.gif
     目录           0  2020-03-08 13:23  source\Backup\
     文件         947  2009-06-24 11:09  source\Backup\WindowsApplication1.sln
     目录           0  2020-03-08 13:23  source\Backup\WindowsApplication1\
     文件        2537  2007-11-08 16:46  source\Backup\WindowsApplication1\Anteprima.cs
     文件        9522  2007-11-08 16:46  source\Backup\WindowsApplication1\Anteprima.Designer.cs
     文件        6211  2007-11-08 16:46  source\Backup\WindowsApplication1\Anteprima.resx
     文件        3157  2007-11-20 11:18  source\Backup\WindowsApplication1\Form1.cs
     文件        5178  2007-11-20 11:18  source\Backup\WindowsApplication1\Form1.Designer.cs
     文件        5987  2007-11-20 11:18  source\Backup\WindowsApplication1\Form1.resx
     文件       13872  2007-11-30 13:49  source\Backup\WindowsApplication1\Handle.cs
     文件        2241  2007-11-09 09:37  source\Backup\WindowsApplication1\Help.cs
     文件        3679  2007-11-09 09:37  source\Backup\WindowsApplication1\Help.Designer.cs
     文件        5814  2007-11-09 09:37  source\Backup\WindowsApplication1\Help.resx
     文件         486  2007-05-02 14:08  source\Backup\WindowsApplication1\Program.cs
     目录           0  2020-03-08 13:23  source\Backup\WindowsApplication1\Properties\
     文件        1299  2007-06-01 11:03  source\Backup\WindowsApplication1\Properties\AssemblyInfo.cs
     文件        2862  2009-06-24 11:08  source\Backup\WindowsApplication1\Properties\Resources.Designer.cs
     文件        5612  2007-05-02 14:08  source\Backup\WindowsApplication1\Properties\Resources.resx
     文件        1117  2009-06-24 11:08  source\Backup\WindowsApplication1\Properties\Settings.Designer.cs
     文件         249  2007-05-02 14:08  source\Backup\WindowsApplication1\Properties\Settings.settings
     文件       10463  2009-06-24 11:14  source\Backup\WindowsApplication1\richForm2.cs
............此处省略93个文件信息

评论

共有 条评论