Results 1 to 2 of 2

Thread: Resize MDI parent form

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 1999
    Posts
    19

    Post

    Hi
    I'd like to find out if there's to disable resize for MDI parent form and to disable the maximum control button on the MDI form.
    Please advice


  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    Sure, try this:
    Code:
    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_MAXIMIZEBOX = &H10000
    Private Const WS_THICKFRAME = &H40000
    
    Private Sub MDIForm_Load()
        Call SetWindowLong(hwnd, GWL_STYLE, _
        GetWindowLong(hwnd, GWL_STYLE) _
        Xor WS_THICKFRAME Xor WS_MAXIMIZEBOX)
    End Sub
    ------------------
    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width