回 帖 发 新 帖 刷新版面

主题:[讨论]请教如何将C#中画好的图形使其在"画图剪贴板"中显示?

请教如何将C#中画好的图形使其在"画图剪贴板"中显示?
这是我的图形代码;不知道要使其出现在"剪贴板"中要加什么代码?
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace 全跳动
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Paint(object sender, PaintEventArgs e)
        {
            Graphics a = this.CreateGraphics();
            Pen pen1 = new Pen(Color.Black);
            Pen pen2 = new Pen(Color.Black);
            pen1.Width = 2;
            pen2.Width = 2;
            System.Drawing.Drawing2D.AdjustableArrowCap aac;
            aac = new System.Drawing.Drawing2D.AdjustableArrowCap(3, 20);

            pen1.CustomStartCap = aac;
            //pen1.CustomEndCap = aac;

            a.DrawLine(pen1, 68, 20, 34, 80);
            a.DrawLine(pen1, 88, 20, 54, 80);
            a.DrawLine(pen2, 34, 80, 54, 80);

        }
    }
}

回复列表 (共2个回复)

沙发


ding 帮帮忙啊

板凳

ding

我来回复

您尚未登录,请登录后再回复。点此登录或注册