代码
在pictureBox的Paint事件中写下如下代码

private void pictureBox1_Paint(object sender, PaintEventArgs e)

{

foreach (Control C in this.Controls)

{

if (C is Label)

{

Label L
= (Label)C;

L.Visible
= false;

e.Graphics.DrawString(L.Text, L.Font,
new

SolidBrush(L.ForeColor), L.Left
- pictureBox1.Left, L.Top - pictureBox1.Top);

}

}

}

或者在载入页面的时候在LOAD中写入下面代码:

pictureBox1.SendToBack();

label1.BackColor
= Color.Transparent;

label1.Parent
= pictureBox1;

label1.BringToFront();

 

posted on 2010-04-08 02:46  sn_wolf  阅读(904)  评论(0编辑  收藏  举报