要如何像Adobe的軟體一樣的啟動畫面背景是透明和陰影?
我現在都不知道他的技術是怎樣設計的?
可以顯示陰影和背景透明!
2006-02-14 14:05:24 · 2 個解答 · 發問者 ? 6 in 電腦與網際網路 ➔ 程式設計
不行,不知道是不是我貼錯地方,沒有效果!
2006-02-16 15:24:24 · update #1
'看看這能不能幫到你將表單變透明及透空,作業系統需2000(含)以上才有作用!
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 Command1_Click() ''整個表單(不含元件)變透空
Dim I As Long
Me.BackColor = 12
I = GetWindowLong(Me.hWnd, GWL_EXSTYLE)
SetWindowLong Me.hWnd, GWL_EXSTYLE, I Or WS_EX_LAYERED
SetLayeredWindowAttributes Me.hWnd, 12, 0, LWA_COLORKEY
End Sub
Private Sub Command2_Click() ''整個表單(含元件)變透明
Dim I As Long, A As Byte
A = 120 ''透明度 0~255之間 越小越透明
I = GetWindowLong(Me.hWnd, GWL_EXSTYLE)
SetWindowLong Me.hWnd, GWL_EXSTYLE, I Or WS_EX_LAYERED
SetLayeredWindowAttributes Me.hWnd, 120, A, LWA_ALPHA
End Sub
2006-02-14 21:57:30 · answer #1 · answered by W.J.S. 7 · 0⤊ 0⤋
到下面的網址看看吧
▶▶http://qoozoo09260.pixnet.net/blog
2014-10-22 16:14:37 · answer #2 · answered by Anonymous · 0⤊ 0⤋