-
Oct 25th, 2007, 10:58 PM
#1
Thread Starter
Lively Member
[Resolved] Uncloseable App
Is it possible to make an app that the task manager can't close? And if so, how?
Last edited by James Bearss; Oct 26th, 2007 at 01:32 AM.
-
Oct 25th, 2007, 11:07 PM
#2
Re: [2005] Uncloseable App
Yes. You have to handle the Form1_FormClosing Event and check for the
Code:
If e.CloseReason = CloseReason.TaskManagerClosing Then
'Do ur coding here
e.cancel=True
End If
Please mark you thread resolved using the Thread Tools as shown
-
Oct 25th, 2007, 11:09 PM
#3
Thread Starter
Lively Member
Re: [2005] Uncloseable App
-
Dec 7th, 2017, 12:19 PM
#4
New Member
Re: [2005] Uncloseable App
Hi! The e.CloseReason isn't working for me!
'CloseReason" is not a member of 'CancelEventArgs'
Code:
Code:
Private Sub Form1_Closing(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
If e.CloseReason = CloseReason.TaskManagerClosing Then
'Do ur coding here
e.Cancel = True
End If
End Sub
-
Dec 7th, 2017, 12:21 PM
#5
New Member
Re: [2005] Uncloseable App
But now it's working.. I changed the Sub..
Code:
Private Sub Form1_FormClosing(sender As Object, e As FormClosingEventArgs)
If e.CloseReason = CloseReason.TaskManagerClosing Then
'Do ur coding here
e.Cancel = True
End If
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|