Form WITH Minimize, but NOT close?

  • Thread starter Thread starter mdb
  • Start date Start date
M

mdb

Can anyone suggest how I might achieve having a Minimize button, but NOT a
maximize or close button on a form?

Thanks!

-mdb
 
mdb said:
Can anyone suggest how I might achieve having a Minimize button, but NOT a
maximize or close button on a form?

Add the code below to your form and set the form's 'MaximizeBox' property to
'False':

\\\
Protected Overrides ReadOnly Property CreateParams() As CreateParams
Get
Dim cp As CreateParams = MyBase.CreateParams
Const CS_DBLCLKS As Int32 = &H8
Const CS_NOCLOSE As Int32 = &H200
cp.ClassStyle = CS_DBLCLKS Or CS_NOCLOSE
Return cp
End Get
End Property
///
 
Back
Top