Windows Mobile中如何使PicturesBox控件上的Label控件背景透明

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 - this.pictureBox1.Left, L.Top - this.pictureBox1.Top);
                 }
             }
 
        }

  

posted @ 2011-09-16 12:19  小锋神  阅读(354)  评论(0编辑  收藏  举报