日期:2014-05-17 浏览次数:20828 次
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
GraphicsPath gp1 = null;
GraphicsPath gp2 = null;
GraphicsPath gp3 = null;
public Form1()
{
InitializeComponent();
}
private void Form1_Resize(object sender, EventArgs e)
{
Bitmap bit = new Bitmap(panel3.Width, panel3.Height);
Graphics g = Graphics.FromImage(bit);
g.Clear(Color.Transparent);
g.DrawImage(Properties.Resources._1, 0, 0, panel3.Height, panel3.Width);
gp1 = GetTransparentBounds(bit);
g.Clear(Color.Transparent);
g.DrawImage(Properties.Resources._2, 0, 0, panel3.Height, panel3.Width);
gp2 = GetTransparentBounds(bit);
g.Clear(Color.Transparent);
g.DrawImage(Properties.Resources._3, 0, 0, panel3.Height, panel3.Width);
gp3 = GetTransparentBounds(bit);
g.DrawImage(Properties.Resources._1, 0, 0, panel3.Height, panel3.Width);
g.DrawImage(Properties.Resources._2, 0, 0, panel3.Height, panel3.Width);