level 15
Option Explicit
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 Const WS_EX_LAYERED = &H80000
Private Const GWL_EXSTYLE = (-20)
Private Const LWA_COLORKEY = &H1
----------------------------------------
Private Sub Form_Load()
Me.BackColor = vbBlue
Dim rtn As Long
rtn = GetWindowLong(hwnd, GWL_EXSTYLE)
rtn = rtn Or WS_EX_LAYERED
SetWindowLong hwnd, GWL_EXSTYLE, rtn
SetLayeredWindowAttributes hwnd, vbBlue, 0, LWA_COLORKEY
End Sub
2011年10月12日 08点10分
6
能不能加上注释
2013年06月08日 03点06分
level 4
这些看不懂!
向您请教一个简单的问题:
Private Sub Form_Load()
Print "天天向上"
End Sub
'加载事件为什么不能输出?
2011年11月30日 11点11分
8
level 15
Private Sub Form_Load()
Me.AutoRedraw = True
Print "天天向上"
End Sub
2011年11月30日 22点11分
9
autoredraw是做啥的?
2013年05月25日 05点05分