智能手表 电子墨水:ThunderForm类窗口有没有GWL

来源:百度文库 编辑:中财网 时间:2024/04/29 13:34:59
VB code  使用SetWindowLong设置
Option Explicit'在窗口结构中为指定的窗口设置信息Private Declare Function SetWindowLong Lib "user32" _                Alias "SetWindowLongA" (ByVal hwnd As Long, _                                        ByVal nIndex As Long, _                                        ByVal dwNewLong As Long) As LongPrivate Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hwnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long'从指定窗口的结构中取得信息Private Declare Function GetWindowLong Lib "user32" _                Alias "GetWindowLongA" (ByVal hwnd As Long, _                                        ByVal nIndex As Long) As LongPrivate Const WS_EX_LAYERED = &H80000Private Const GWL_EXSTYLE = (-20)Private Const LWA_ALPHA = &H2Private Const LWA_COLORKEY = &H1'Private Sub Form_Load()Dim ret As Longret = GetWindowLong(Me.hwnd, GWL_EXSTYLE)If ret = 0 Then Debug.Print "error"SetWindowLong Me.hwnd, GWL_EXSTYLE, ret Or WS_EX_LAYEREDSetLayeredWindowAttributes hwnd, 0, 200, LWA_ALPHAEnd Sub
http://topic.csdn.net/u/20090228/10/282e3e8f-3728-45bb-86ee-11be33da6d57.html