Results 1 to 8 of 8

Thread: Form Re-loads when form closed? huh?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2007
    Posts
    21

    Form Re-loads when form closed? huh?

    I have a program with a user control. In the user control is an Internet Control (to download stuff). If the user wants to Cancel the download and exit the program, for some reason the program re-opens and resumes download; Even after Inet.Cancel function is called.

    AirDisp is the UserControl (instances of)
    deletedCtrls is the number of deleted controls

    Code:
    Private Sub Form_Unload(Cancel As Integer)
    
        On Error Resume Next
        
        Dim cCtrl As Integer
        
        For cCtrl = 1 To AirDisp.Count + deletedCtrls - 1
    
            AirDisp(cCtrl).Cancel
    
        Next cCtrl
    
    
    End Sub
    My question is; is there a way to cancel the download and close the program?

  2. #2

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Dec 2007
    Posts
    21

    Re: Form Re-loads when form closed? huh?

    But i dont no whats causing the form to re-load?

  4. #4

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Dec 2007
    Posts
    21

    Re: Form Re-loads when form closed? huh?

    Deleted the Unload Code out, still reloads

  6. #6

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Dec 2007
    Posts
    21

    Re: Form Re-loads when form closed? huh?

    How do you trigger form to get unloaded?
    By clicking the X button.

  8. #8
    Frenzied Member
    Join Date
    Dec 2007
    Posts
    1,072

    Re: Form Re-loads when form closed? huh?

    me.enabled=false?

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