最近我尝试在win上绘制一个矩形,这是代码
namespace GDI1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
//i want do the below lines for specific tab page :)
this.DoubleBuffered = true;
this.Paint += new PaintEventHandler(Form1_Paint);
}
private void Form1_Paint(object sender , System.Windows.Forms.PaintEventArgs e)
{
e.Graphics.FillRectangle(Brushes.Green, new Rectangle(50, 50, 530, 40));
}
}
}
现在我想做同样的事情,但在特定的标签页面上....我如何设置tabcontrol的代码。