VB--去掉MDI Form的{BANNED}最佳大化按钮
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 WS_MAXIMIZEBOX = &H10000
Private Const WS_THICKFRAME = &H40000
Private Const GWL_STYLE = (-16)
Private Sub MDIForm_Load()
Dim TempLng As Long
TempLng = GetWindowLong(Me.hwnd, GWL_STYLE)
TempLng = TempLng And Not WS_MAXIMIZEBOX '{BANNED}最佳大化
TempLng = TempLng And Not WS_THICKFRAME '可改变大小的边框
SetWindowLong Me.hwnd, GWL_STYLE, TempLng
End Sub
阅读(147) | 评论(0) | 转发(0) |