[Resolved] Uncloseable App-VBForums
Results 1 to 5 of 5

Thread: [Resolved] Uncloseable App

  1. #1

    Thread Starter
    Lively Member James Bearss's Avatar
    Join Date
    Jun 2007
    Location
    USA, Wisconsin
    Posts
    120

    Resolved [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 02:32 AM.
    I like doing magic tricks, and I program in Visual Basic (Duh)

    Download my garage sale helper at
    http://www.vbforums.com/showthread.p...96#post3040996

  2. #2
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,834

    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



    www.techreceipe.tk


  3. #3

    Thread Starter
    Lively Member James Bearss's Avatar
    Join Date
    Jun 2007
    Location
    USA, Wisconsin
    Posts
    120

    Re: [2005] Uncloseable App

    thanks
    I like doing magic tricks, and I program in Visual Basic (Duh)

    Download my garage sale helper at
    http://www.vbforums.com/showthread.p...96#post3040996

  4. #4
    New Member
    Join Date
    Dec 2017
    Posts
    2

    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

  5. #5
    New Member
    Join Date
    Dec 2017
    Posts
    2

    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
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.