level 14
vb6如何实现整个窗体(包括窗体里面的控件以及控件中加载的背景图片)透明化显示?还有有啥办法能够实现磨砂模糊的透明化,就是类似于win7那种aero磨砂玻璃特效
2014年12月31日 11点12分
1
level 8
Const LWA_COLORKEY = &H1
Const LWA_ALPHA = &H2
Const GWL_EXSTYLE = (-20)
Const WS_EX_LAYERED = &H80000
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hWnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long
Private Sub Form_Load()
Dim Ret As Long
Ret = GetWindowLong(Me.hWnd, GWL_EXSTYLE)
Ret = Ret Or WS_EX_LAYERED
SetWindowLong Me.hWnd, GWL_EXSTYLE, Ret
'将窗体的透明度设成128(0-255)
SetLayeredWindowAttributes Me.hWnd, 0, 200, LWA_ALPHA
End Sub
2015年05月01日 05点05分
4
把需要透明的控件背景都调成那种蓝色[好吧我也没法解释,就是像网页链接的那个字的颜色]
2015年05月01日 05点05分
回复 020030416183 :谢谢谢谢谢谢谢谢谢谢谢谢啦
2015年05月01日 11点05分
回复
��ά001
:
![[笑眼]](/static/emoticons/u7b11u773c.png)
2015年05月01日 11点05分