how can i remove/disable the minimize and maximize button on my mdi form? tx
Printable View
how can i remove/disable the minimize and maximize button on my mdi form? tx
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
Do you want to do this for just the parent form, or the parent form and all child forms as well?
just the mdi. is using mdi better than using ordinary form? btw about the button in the middle , how can i disable it?http://imagehoster.us/uploads/d0b6c87404.jpg
Did you notice link I posted?
yes, the prob is when i set mdi windowstate = maximized , i can still click the button.
How's that possible if buttons (both Min and Max) get deleted from the control box?
i think u should try it.
I believe I did! Wouldn't suggest otherwise... :rolleyes:Quote:
Originally Posted by mamba
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
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.Quote:
Originally Posted by RhinoBull