Results 1 to 12 of 12

Thread: mdi form minimize maximize

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2007
    Posts
    36

    mdi form minimize maximize

    how can i remove/disable the minimize and maximize button on my mdi form? tx

  2. #2
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: mdi form minimize maximize

    Downloadd this sample project first.
    Add CFormBorder class to your project and on mdiform_load evnt do this:
    Code:
    Private Sub MDIForm_Load()
    Dim myClass As CFormBorder
    
       Set myClass = New CFormBorder
       Set myClass.Client = Me
    
        myClass.MinButton = False
        myClass.MaxButton = False
    
        Set myClass = Nothing
    
    End Sub

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: mdi form minimize maximize

    Do you want to do this for just the parent form, or the parent form and all child forms as well?

  4. #4

    Thread Starter
    Member
    Join Date
    Sep 2007
    Posts
    36

    Re: mdi form minimize maximize

    just the mdi. is using mdi better than using ordinary form? btw about the button in the middle , how can i disable it?

  5. #5

  6. #6

    Thread Starter
    Member
    Join Date
    Sep 2007
    Posts
    36

    Re: mdi form minimize maximize

    yes, the prob is when i set mdi windowstate = maximized , i can still click the button.

  7. #7

  8. #8

    Thread Starter
    Member
    Join Date
    Sep 2007
    Posts
    36

    Re: mdi form minimize maximize

    i think u should try it.

  9. #9

  10. #10
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: mdi form minimize maximize

    I tried it too. If I called .EnableMenuItem smMaximize, False then the maximize menu is grayed out, however, the max button is still active & works. To remove max & min, disable both this way.... Disabling only one does not remove it from the menubar but does disable the button.

    Code:
        Dim c As New Class1 ' < change name to whatever your class is named
        Set c.Client = Me
        c.MaxButton = False
        c.MinButton = False

  11. #11

  12. #12
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: mdi form minimize maximize

    Quote Originally Posted by RhinoBull
    In post #2 I did show what needs to be done so really don't understand the arguments.
    Yes, and I am blind. I couldn't reproduce the issue noted when setting windowState via code either.

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