Label背景透明是相对于Label的Parent而言的,如果Label的Parent是一个winform,而这个winform又有一个PictureBox,现在Label放在PictureBox上,单纯设置Label.BackColor = Color.Transparent;发现Label背景是winform的背景,依旧会遮挡PictureBox,还需要设置Label的Parent为PictureBox。
Label背景透明是相对于Label的Parent而言的,如果Label的Parent是一个winform,而这个winform又有一个PictureBox,现在Label放在PictureBox上,单纯设置Label.BackColor = Color.Transparent;发现Label背景是winform的背景,依旧会遮挡PictureBox,还需要设置Label的Parent为PictureBox。
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。