日期:2014-05-17 浏览次数:20920 次
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace PAINTER
{
public partial class Form1 : Form
{
private Image MyImg;
int startX, startY;
Graphics g;
bool mouseDown = false;
public Form1()
{
InitializeComponent();
}
private void radioButton1_CheckedChanged(object sender, EventArgs e)
{
}
private void Form1_Load(object sender, EventArgs e)
{
this.MouseDown += new MouseEventHandler(Form1_MouseDown);
this.MouseUp += new MouseEventHandler(Form1_MouseUp);
this.MouseMove += new MouseEventHandler(Form1_MouseMove);
}
private void Form1_MouseDown(object sender, MouseEventArgs e)
{
mouseDown = true;
startX = e.X;
startY = e.Y;
}
private void Form1_MouseUp(object sender, MouseEventArgs e)
{
mouseDown = false;
g = this.CreateGraphics();
Pen p = new Pen(Color.Cyan,3);
System.Drawing.Drawing2D.AdjustableArrowCap lineArrow =
new System.Drawing.Drawing2D.AdjustableArrowCap(4, 4,