首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VB >

为什么用setwindowlong设置控件风格没有反应?解决方法

2012-03-17 
为什么用setwindowlong设置控件风格没有反应?PrivateDeclareFunctionGetWindowLongLibuser32 AliasGetW

为什么用setwindowlong设置控件风格没有反应?
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   Const   GWL_STYLE   =   (-16)

Private   Const   WS_EX_TOOLWINDOW   =   &H80
Private   Const   WS_CAPTION   =   &HC00000


Private   Sub   Form_Load()
        Dim   hWnd   As   Long
       
        hWnd   =   Picture1.hWnd
        Style   =   GetWindowLong(hWnd,   GWL_EXSTYLE)
        SetWindowLong   hWnd,   GWL_EXSTYLE,   (Style   Or   WS_EX_TOOLWINDOW)
        Style   =   GetWindowLong(hWnd,   GWL_STYLE)
        SetWindowLong   hWnd,   GWL_STYLE,   (Style   Or   WS_CAPTION)
End   Sub


[解决办法]
我这里正常啊,要什么反映?picturebox风格有变化啊

热点排行