[Tutorial] Disable Close Button

Posts 1–5 of 5 · Page 1 of 1
[Tutorial] Disable Close Button
Disable Close Button in Forms

Again, credits go to me!


What you need:
1. Windows Forms Application
2. Basic understanding of Forms

First off, you need to enter the "Events" category of Form1. Then from there, continue on to find "FormClosing"

Next, double-click it to enter this code-
Code:
    Private Sub Form1_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
        e.Cancel = True
    End Sub
One line of code, sweet and simple for you sadists that want to torture fools out there in running your program. Enjoy!
already been posted. Search button first!
Quote Originally Posted by scimmyboy View Post
Disable Close Button in Forms

Again, credits go to me!


What you need:
1. Windows Forms Application
2. Basic understanding of Forms

First off, you need to enter the "Events" category of Form1. Then from there, continue on to find "FormClosing"

Next, double-click it to enter this code-
Code:
    Private Sub Form1_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
        e.Cancel = True
    End Sub
One line of code, sweet and simple for you sadists that want to torture fools out there in running your program. Enjoy!
Actually this is posted some times before and I agree with next, make one tread with all these "small" tutorials!
i searched around, and i found that nextgen's tutorial is a different method. just bringing this out. if why06 wants to merge them all, then that would be good.
Posts 1–5 of 5 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?