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..
I am becoming confused with visual studio v. Vb.net. I am findings hundreds of pieces of code tells me how to connect. Snippets elsewhere that tell me how to access ...
So I have a JTextfield in the cells of 1 of the columns in my JTable
I want to allow only numbers and up to one dot/period. Doesant ...
vb.Net - Regular Expression Tester
Every now and then I find another use for a regular expression. For those not familiar with regular expressions, they can be as cryptic to ...