Results 1 to 3 of 3

Thread: How to make one's app uncloseable

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2001
    Location
    East Windsor, NJ
    Posts
    1
    How do you make a VB app uncloseable?, excluding ctl-alt-del solutions.
    -----------------------
    G Jamil
    The moons have aligned, and I rise again

  2. #2
    Guest
    Try this:


    Code:
    Private Sub Form_Load()
        App.TaskVisible = False
    End Sub
    
    
    Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
        Cancel = Not ReadyToClose
    End Sub
    
    
    Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    
        If (Shift = vbAltMask) Then
            Select Case KeyCode
                Case vbKeyF4
                KeyCode = 0
             End Select
        End If
    
    End Sub

  3. #3
    Guest
    Matthew Gates: Using your method, the App can still be closed via sending the WM_CLOSE message, and DestroyWindow function.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width