CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2001
    Posts
    7

    Performed a Illegal Operation error

    Does anyone have any idea why when I tried to exit the program in the middle, an illegal operation error message appears everytime. Then I have to close VB and restart it again. I have tried checking for referencing and making sure the references to the dll's, objects are set to nothing after its use. Any ideas?


    Anne


  2. #2
    Join Date
    Mar 1999
    Location
    Nepal
    Posts
    540

    Re: Performed a Illegal Operation error

    In the QueryUnload event of the main form, unload all other forms. This may help. If you have code in the unload event of other forms, check them properly. If you want to track where the cause of the problem is, use the following code in the QueryUnload of the main form:


    dim aForm as Form
    for each aForm in Forms
    MsgBox "Unloading " & aForm.Name
    Unload aForm
    MsgBox "Unloaded " & aForm.Name " Successfully."
    next






  3. #3
    Join Date
    Dec 2000
    Location
    India
    Posts
    25

    Re: Performed a Illegal Operation error

    Also see if the classes or in the code in dlls the database connections or other objects that u might be using are properly closed. Also see if there is any specific sequence of events which leads to this error. Make sure the dlls u r using work properly when tested independently.


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

Featured