close icon disable

K

krishna

Hi,

I would like to disable the close icon on the
form which will be available at the right most corner of
the form in VB.NET which property i have to set.

Regards,
Krishna.
 
C

Cor Ligthert

Krishna,

Although it is easy to do, will disabling the close button probably mean
that your users will call this a bug.

In my opinion is better to set the controlbox to false.

I hope this helps?

Cor
 
R

Richard

Put this anywhere in the form.

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top