Transparent的使用有时可以达到意想不到的效果,很棒的噢!

1.把Form的backColor设置成粉色的,如下图:
                            Form如何只让控件显示,而窗体Transparent

2.把Form的TransparencyKey也设置成粉色的.

3.把Button的backColor不要设置成粉色的,其他的任何一种颜色都可以.

4.在load函数中写
Form如何只让控件显示,而窗体Transparentthis.Opacity = 1;
注意1是不透明,0是全透明,介于两者之间的自然是中间透明了
好,我们运行一下,看效果:


                  Form如何只让控件显示,而窗体Transparent

相关文章:

  • 2022-12-23
  • 2021-09-12
  • 2021-06-01
  • 2022-03-10
  • 2021-09-02
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-25
  • 2022-01-26
  • 2022-12-23
  • 2022-12-23
  • 2021-09-28
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案