请问办法让MDI窗体按固定大小显示吗?
请问有办法让MDI窗体按设置时的大小显示,而不被随意拉动大小吗?
Private Const WS_MAXIMIZEBOX As Long = &H10000 Private Const WS_THICKFRAME As Long = &H40000 Private Const WS_MINIMIZEBOX = &H20000 Private Const GWL_STYLE = (-16) Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long Private Sub MDIForm_Load() Dim lStyle As Long lStyle = GetWindowLong(Me.hwnd, GWL_STYLE) lStyle = lStyle And Not WS_MAXIMIZEBOX '最大化 lStyle = lStyle And Not WS_MINIMIZEBOX '最小化 lStyle = lStyle And Not WS_THICKFRAME '可改变大小的边框 SetWindowLong Me.hwnd, GWL_STYLE, lStyle End Sub