Friends, In VB.net Form properties, There are Maximize Box and Minimize Box.If we make them false, those prperties will be disabled.Likewise there is a Close Box at the right top corner of the form.How can we disable this? Is there any way at design time to disable this? If not,Can we disable it through code?
You could set the FromBorderStyle property to None.
In the FormClosing you could always do
e.Cancel = True
But you should also give the user some other way to exit. For example, if the user selects Exit from a menu you could set a class flag as in
Private ReallyExit As Boolean = False Private Sub Form1_FormClosing(sender As System.Object, e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing e.Cancel = ReallyExit End Sub
Just make sure that somewhere in your code you do
ReallyExit = True
Edited by Reverend Jim
Thank you all ..Making Formboarder style to None is easier and convenient..
Hello, I work at the U.S. Department of Labor. I am a maintenance prorgrammer of C code, and the configuration management of this code in the past has been very ...
Please I have an autocomplete textbox which fetches value from a tabe in the database. But after i choose the name i want to get the id of the value ...
Please tell me why triangle shape is redrawing on mouse move. It want triangle shape draw only once until mouse release.
Here is my code below. Thank you ...