DrawingGroup.Opacity 属性
命名空间:
System.Windows.Media
程序集:
PresentationCore.dll
获取或设置此 DrawingGroup 的不透明度。
属性值
Double
介于 0 和 1 之间(包括 0 和 1)的值,用于描述此 DrawingGroup 的不透明度。 默认值为 1。
Me.Opacity = 0.8 '整体透明度(包括控件+form窗体背景)
Me.Opacity =0'全透明 (窗体存在但无法看见,与me.hide()有本质区别,当然你可以这样混用)
Me.Opacity =1'不透明
Form.TransparencyKey 属性
命名空间:
System.Windows.Forms
程序集:
System.Windows.Forms.dll
获取或设置将表示窗体透明区域的颜色。
属性值
Color
Color,表示要在窗体上透明显示的颜色。
Me.TransparencyKey = Me.BackColor 'form窗体背景透明 控件不透明
Me.TransparencyKey=需要透明的颜色
Opacity 和 TransparencyKey 可同时使用。