1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
<pre class="brush:vb;toolbar:false">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 Sub Form_Load()
Dim sy As Long
Dim newsy As Long
Const GWL_STYLE = -16
Const WS_CAPTION = &HC00000
Const WS_BORDER = &H800000
sy = GetWindowLong(Me.hwnd, GWL_STYLE)
newsy = SetWindowLong(Me.hwnd, GWL_STYLE, sy - WS_CAPTION - WS_BORDER)
End Sub
|