dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: VB IDE Closes when Application Ends

  1. #1
    Join Date
    Jan 2002
    Posts
    11

    VB IDE Closes when Application Ends

    I have just started using VB 6 (I'm an old VB 4 and C++ developer), and I'm debugging an application. Funny, though, whenever I "End" the app, either by pressing the Debug | End button (or from menu), or even if I choose System Menu | Close in the app, the applicaiton ends, but so does the VB IDE.

    Anyone have any ideas?

    Thanks in advance.

  2. #2
    Join Date
    Jun 2001
    Location
    MO, USA
    Posts
    2,868
    Do you have all the serivce paks installed (5 is the latest I think)? Also, are you using any API calls that may not be cleaning up after themselves?

  3. #3
    Join Date
    Jan 2002
    Posts
    11
    Yes, I am using SP 5, and I'm not outwardly using API calls. I am, however using this platform to debug a COM object dll.

    Ok, something in that interface must be the problem. I just commented out the COM calls and the IDE doesn't quit.

    Sometimes it just takes a little rattling from the outside world.

    Thanks.

  4. #4
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    Ide crashes

    ...it does not close: it crashes.
    If you have com components, you should stop them correctly.
    Pressing end button does not fire the unload events of your form and the terminate event of your components.
    Instead, you should provide a button and or menu item choosing which you should:
    Unload all forms
    ie:
    Code:
    'in your main form:
    Private sub Form_QueryUnload(Unload mode as integer,Cancel as integer)
    dim frmX as form
    for each frmX in forms
      if frmX.name<> me.Name then
          unload frmX
      end if
    next
    'here properly close and set to nothing your components
    'This is pseudocode, as I do not know
    'which componentrs are you using
    set myComp01= nothing
    myComp02.quit
    set myComp02= nothing
    End sub
    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)