Results 1 to 2 of 2

Thread: MDI Form Buttons

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2000
    Location
    India
    Posts
    16

    Wink

    I want to privent users from minimize and maximize MDI Forms. How can i manage this ?

  2. #2
    Guest
    Here you go:

    Code:
    Private Declare Function GetSystemMenu Lib "User32" (ByVal hWnd As Integer, ByVal bRevert As Integer) As Integer
    Private Declare Function RemoveMenu Lib "User32" (ByVal hMenu As Integer, ByVal nPosition As Integer, ByVal wFlags As Integer) As Integer
    Const MF_BYPOSITION = &H400
    
    Private Sub Form_Load()
        RemoveMenu GetSystemMenu(hWnd, 0), 6, MF_BYPOSITION 'Disable Close
        RemoveMenu GetSystemMenu(hWnd, 0), 4, MF_BYPOSITION 'Disable Maximize
        RemoveMenu GetSystemMenu(hWnd, 0), 3, MF_BYPOSITION 'Disable Minimize
    End Sub

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