RE: VB 6 form unload hangs

From: simmonda (simmonda_at_discussions.microsoft.com)
Date: 01/18/05


Date: Tue, 18 Jan 2005 02:17:03 -0800

I have a similar problem with unloads failing in a tight VBVM loop. The
potential cause I have under consideration is caused by nested user controls
bubbling events to the form. Post 2005-01-13 gives a simple example that
fails.

"Myles Duffy" wrote:

> I have an a VB 6 application with about 140 forms.
>
> I generally exposed my form loads that need to be passed objects with
> something like the following (I've included some calls to LogDebug in the
> following discussion):
>
> globally declare:
> Private o as clsObject
>
> Public Sub ShowForm (p as clsObject)
> LogDebug "ShowForm Entered"
> set o = p
> frm.Show vbModal
> LogDebug "ShowForm Exited"
> end sub
>
> Private sub FormUnload()
> LogDebug "FormUnload Entered"
> set o = nothing
> LogDebug "FormUnload Exited"
> end sub
>
> I have one form I load vbModal. Underneath it is a MDI main form and 2 MDI
> children. One of the mdi children call the vbModal form referred to above.
> The form loaded vbModal isn't really complicated and uses a few FarPoint
> controls.
>
> What is happening for users but I have yet to repro is my application will
> hang in a tight processor loop and my debug log file (which I open and close
> on every call so I know it is complete) looks like:
>
> ShowForm Entered
> FormUnload Entered
> FormUnload Exited
>
> (it never gets to ShowForm Exited).
>
> I also log form loads and sometimes this form will be loaded a couple
> hundred times across a day before it hangs and I can't for the life of me
> figure out what's causing it. We're running SP5 and I haven't seen anything
> in SP6 that would fix it and because we also have a few hundred of the in
> the field that would be pretty drastic.
>
> I've seen a system with the app hung in this state and I've used winternals
> filemon and regmon and it not doing any of that, I've used Spy++ and there's
> not windows messages going to it, it's just hung.
>
> As I said with all the other forms in this app, this is the only one
> experiencing it. When it hangs most of the form is still visible and it
> looks like something like a frame from the underlying mdi child is starting
> to refresh.
>
> This is happening on a number of systems intermittently so I don't think
> it's something peculiar to a particular system.
>
> I am totally stumped. Anybody seen anything like this of have any
> suggestions?
>
> Much Appreciated
>
>
>



Relevant Pages

  • MDI Child Problem
    ... I'm having a problem with MDI child forms when the ... reference to the MDI Parent is set in a Control library. ... Protected Overloads Overrides Sub Dispose(ByVal ... Windows Form Designer ...
    (microsoft.public.dotnet.languages.vb)
  • MDI Child Problem (with code to reproduce)
    ... I'm having a problem with MDI child forms when the ... reference to the MDI Parent is set in a Control library. ... Protected Overloads Overrides Sub Dispose(ByVal ... Windows Form Designer ...
    (microsoft.public.dotnet.framework.windowsforms)
  • RE: MDI Client Problem
    ... Yes, after following your statement, I placed a OpenFileDialog in a MDI ... Child form, which is invoked in Form3_Activated event, and when the dialog ... I think your current concern is how to place some long time processing ... Sub DoWork() ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: My.Application.OpenForms
    ... Shared Sub A_ResizeToFit(ByVal frmMain As Form, ... ' make the form fill the client area of the MDI Container ... small displacement and each subsequent MDI child generated at a furthur ... Shared Sub FitChildToMDI(ByVal frmMDI As Form, ByRef frmChild As Form, ByVal ...
    (microsoft.public.dotnet.languages.vb)
  • Re: MDIForm Parent/Child forms BEST Practice
    ... First i always create a public var of my main form (mdi parent) for easy ... access (yust declare it in a module and i the parent.load set the var to me) ... Private Sub frmMain_Closed(ByVal sender As Object, ...
    (microsoft.public.dotnet.languages.vb)

Loading