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 网络五子棋2
{
public partial class Form1 : Form
{
private Graphics draw;
private PictureBox pb;
public Form1()
{ InitializeComponent();
//start();
} private void start()
{ draw = pb.CreateGraphics();
Pen mypen = new Pen(Color.Red, 3);
Rectangle rect = new Rectangle(50, 70, 256, 256);
draw.DrawRectangle(mypen, rect);
for (int i = 1; i <= 15; i++)
{
draw.DrawLine(mypen, 50 + 16 * i, 70, 50 + 16 * i, 326);
draw.DrawLine(mypen, 50, 16 * i + 70, 306, 16 * i + 70);
} }
}
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;namespace 网络五子棋2
{
public partial class Form1 : Form
{
private Graphics draw;
private PictureBox pb;
public Form1()
{ InitializeComponent();
//start();
} private void start()
{ draw = pb.CreateGraphics();
Pen mypen = new Pen(Color.Red, 3);
Rectangle rect = new Rectangle(50, 70, 256, 256);
draw.DrawRectangle(mypen, rect);
for (int i = 1; i <= 15; i++)
{
draw.DrawLine(mypen, 50 + 16 * i, 70, 50 + 16 * i, 326);
draw.DrawLine(mypen, 50, 16 * i + 70, 306, 16 * i + 70);
} }
}
解决方案 »
- 请大家帮忙解答,C#中,用ADO.NET连接Access2007数据库,不能插入语句,insert 语句绝对没问题,谢谢!!?
- gdi+扇形的颜色对称填充
- Happy 牛 year!~顺便问一个小问题
- 如何用c#编写一个可以覆盖安装的安装软件
- DataTable快速导出
- 定义了一个指定长度的数组(一维),但在程序运行时要改变数组的长度???该如何实现???
- dataGrid某个单元格的值为0时,如何显示为“”或者空。
- 什么是单线程?有那些关于单线程的电子书?下载网址是???
- 调查:你现在用VS2002,还是用VS2003?
- 对于引用类型,作为参数传递时,使用ref或out和不使它有什么区别?
- ASP.net GridView 如何加入 ToolTip
- Microsoft Visual Studio 里头怎么清除tapage里头数据
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
}
{ InitializeComponent();
}
我想在这里引用,求指导
{
InitializeComponent();
}
我想在这里引用,求指导
{
InitializeComponent();
this. this.Paint += new PaintEventHandler(Form1_Paint);
}
{ draw = pb.CreateGraphics();
改为:draw=this.creategraphics();