昨夜飘风
昨 夜, 风, 飘 过; 枯 树, 叶, 飞 落。
posts - 55,comments - 8,trackbacks - 1
 

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 2008-03-04 14:40 昨夜飘风 阅读(231) 评论(0)  编辑 收藏

标题  
姓名  
主页
Email (博主才能看到) 
验证码 *  看不清,换一张 [登录][注册]
内容(请不要发表任何与政治相关的内容)  
  登录  使用高级评论  新用户注册  返回页首  恢复上次提交      
"五向定位"职业成长路线公开课(上海、南京、大连)
Google站内搜索


相关链接: