vb怎么从镶嵌桌面中恢复?
Option Explicit
Const LWA_COLORKEY = &H1
Const LWA_ALPHA = &H2
Const GWL_EXSTYLE = (-20)
Const WS_EX_LAYERED = &H80000
Const WS_EX_TRANSPARENT As Long = &H20&
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 Or WS_EX_TRANSPARENT
SetWindowLong Me.hWnd, GWL_EXSTYLE, Ret
'Set the opacity of the layered window to 200
SetLayeredWindowAttributes Me.hWnd, 0, 200, LWA_ALPHA
End Sub
这个代码可以进行镶嵌桌面,但是我想增加一个定时器,10秒后,程序从镶嵌桌面中恢复正常,这个代码怎么写啊?
--------------------编程问答-------------------- 知道的发一下吧,急啊 --------------------编程问答-------------------- 定时器里加unload me 不行吗 --------------------编程问答--------------------
不是退出程序,你理解错了
我已经解决了
Dim PreValue&
Call SetWindowLong(Me.hwnd, GWL_EXSTYLE, PreValue)
即可退出镶嵌
补充:VB , API