How to Hide the Close Button in VB 2010

preview_player
Показать описание
In this video, we learn how to hide the close button with out any code at all

QUESTIONS
PM me on YouTube
Leave a comment below

LINKS

Thanks for Watching!
Рекомендации по теме
Комментарии
Автор

Unbelievable that this boy was more useful than 5 forums

rollnrock
Автор

thnks kid, i was looking for this trick.

flipagain
Автор

thank you for you Video, its very simple and Helps me.

glaubedeineillusion
Автор

This, as you indicate, hides the Close button, but it also removes the icon. I want to keep the icon but remove the other buttons. Unfortunately, it doesn't seem like you can do that, specifically (VB 2010, at least). But you can hide the MinBox, and hide the MaxBox, and then disable the Close box (make sure if you do this you actually provide your own way of exiting the form with your own Close button that does Me.Hide() or Me.Close() or something like that). So, anyway, to disable the Close box but leave the icon you must insert the following code in the form's underlying "Designer" code (make sure you have "Show All Files" turned on in Solution Explorer) and you can place this at the bottom just before the "End Class":
'
Private Const CP_NOCLOSE_BUTTON As Integer = &H200
Protected Overloads Overrides ReadOnly Property CreateParams() as CreateParams
Get
Dim myCp As CreateParams = MyBase.CreateParams
myCp.ClassStyle = myCp.ClassStyle Or CP_NOCLOSE_BUTTON
Return myCp
End Get
End Property

lakeofthewoodssecretariat
Автор

What about WPF Applications? There is no controlBox property..

niccis
visit shbcf.ru