Results 1 to 2 of 2

Thread: Multiple Process Issues

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2006
    Posts
    396

    Multiple Process Issues

    Hi;

    While attempting to delete a VB program I'd recently written I got a message saying that it could not be deleted because it was currently locked by another user.

    Upon further investigation I noticed that the Windows Task Manager process tab was showing multiple copies of the program running.

    After some testing I noticed that when I use the End statement to terminate a program all is well. However if I click the little red x in the upper right hand corner of the program window the program ends but still shows up in the task Manager display.

    Does anyone know how to prevent this from happening.

    Thanks
    Lin

  2. #2
    Fanatic Member
    Join Date
    Aug 2005
    Location
    South Africa
    Posts
    760

    Re: Multiple Process Issues

    All of your forms might not be unloaded.
    You should never use the End command, rather loop through each of the forms and unload it, using something like this in the Form_Unload event
    VB Code:
    1. Dim frm As Form
    2. For Each frm In Forms
    3.     Unload frm
    4. Next
    If I helped you out, please consider adding to my reputation!

    -- "The faulty interface lies between the chair and the keyboard" --

    VB6 Programs By Me:
    ** Dictionary, Thesaurus & Rhyme-Generator In One ** WMP Recent Files List Editor ** Pretty Impressive Clock ** Extract Firefox History **

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