读书人

为什么用setwindowlong设置控件风格没

发布时间: 2012-03-17 19:06:28 作者: rapoo

为什么用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风格有变化啊

读书人网 >VB

热点推荐