为什么用setwindowlong设置控件风格没有反应?解决方法
为什么用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风格有变化啊
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风格有变化啊