110,535
社区成员
发帖
与我相关
我的任务
分享
int p_x, p_y;
Color c = new Color();
private void pictureBox1_MouseDown(object sender, MouseEventArgs e)
{
p_x = e.X;
p_y = e.Y;
}
private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
{
Graphics g = pictureBox1.CreateGraphics();
if (e.Button == MouseButtons.Left)
{
g.DrawLine(new Pen(c, Convert.ToInt32(comboBox1.SelectedItem)), new Point(p_x, p_y), new Point(e.X, e.Y));
//g.FillPie(new SolidBrush(Color.Red), p_x, p_y, Convert.ToInt32(comboBox1.SelectedItem), Convert.ToInt32(comboBox1.SelectedItem), 0, 360);
//g.DrawLine(new Pen(
p_x = e.X;
p_y = e.Y;
}
}