help with menustrip

martins87

Member
Joined
Jul 29, 2006
Messages
10
Programming Experience
Beginner
Ive got child form opened in my parent form - it is maximized by default. Can I disable resize button in menustrip, so that users wont be able to mess around with child form looks?
 
What do you mean 'resize button'? Do you mean the 'Minimize' and 'Maximize' buttons in controlbox of the form titlebar perhaps? These can be set with form properties MaximizeBox and MinimizeBox.
 
no, I placed the "resize" button I was talking about in my avatar, have a look... is there any chance of disabling it?
 
oups, that's a restore window button in the image you sent. Better attach image to the post instead of pointing to you r avatar image which you may change at any time, the this post thread will make less sense, you know.
 
Last edited:
I find no way to disable the button, but I can prevent to restore process from happening, this is code for mdi child form:
VB.NET:
Const WM_SYSCOMMAND As Int32 = &H112
Const SC_RESTORE As Int32 = &HF120
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
  If m.Msg = WM_SYSCOMMAND Then
    If m.WParam = SC_RESTORE Then Return
  End If
  MyBase.WndProc(m)
End Sub
 
Back
Top