Window B closing causes a frozen Mainwindow

User clicks a button to open a Dashboard window in a Main window. Dashboard window has about 10 HTMLViewers which shows each Javascript graph.
The problem is that when user closes the Dashboard window, Main window is frozen for 5 seconds.
There is no special code in Close event of Dashboard. Strange.

2015R2 / Windows desktop Application

Any clue on this matter?
Is there any method to debug something when a Window is closed?

Thanks in advance.

You must be doing some loop or some long process in the dashboard cancelclose or close.

To know exactly what holds your program, set Profiling on in project, run it in the IDE, and make sure to quit normally the program. You will then have a full profile about the time it takes for each method/event handler.

I don’t use CancelClose event and Close event just has very simple codes.

  IsDashWindowOpen = False
  If CLIENT Then
    MainWindow.RepConfigCheckTimer.mode = Timer.ModeOff
  End If

Profiling: it only took 205 milliseconds in Close event.
In case I removed all codes in Close event, the same issue happens. Um…

Are you able to replicate this in a new project?