Activate MDIForm with embedded abl window

Posted by bart.syryn on 21-Mar-2018 05:51

Hi, I have a infragistics MDI Tab Manager. I'm using .NET forms with a windowcontainer and embedded ABL Window. I open a MDI Child, so one tab. In that MDI Child - embedded ABL Window, the user can open another Form (MDI Child) with windowcontainer and ABL Window. What happens, the second MDI Child opens, ABL Window is loaded, shown and directly after that, the first MDI Child gets activated again. So focus is again in the first MDI Child. I can force the entry to the second embedded ABL Window in the visiblechanged event, but that gives me a flickering. So second MDI forms gets activated, first get activated and then again second gets activated. Is there a way to work around this ? This is OE11.3SP03. Kind regards, Bart

All Replies

Posted by Matt Gilarde on 21-Mar-2018 06:45

Could you attach code which demonstrates the issue?

Posted by bart.syryn on 21-Mar-2018 08:46

Hi Matt,

This is the code that is in a procedure of the first Embedded ABL Window:

DEFINE VARIABLE L_crplanningform                             AS crplanningform NO-UNDO.

  L_crplanningform = NEW crplanningform().

  L_crplanningform:MdiParent = toolsclass:instance:MenuFormHandle.

  L_crplanningform:TEXT = "Planningsbord".

  L_crplanningform:show().

The constructor of the second (called) form/window:

   CONSTRUCTOR PUBLIC crplanningform ():

       SUPER().

       InitializeComponent().

       THIS-OBJECT:ComponentsCollection:ADD(THIS-OBJECT:components).

       windowcontainer1:BringToFront().

       ASSIGN G_PrgNaam = "crplanning".

       RUN value(G_PrgNaam) PERSISTENT SET hABLProcedure1 ({incl\pmrun.i}).

       ASSIGN hABLWindow1    = hABLProcedure1:CURRENT-WINDOW

              G_designwidth  = hABLWindow1:WIDTH-PIXELS

              G_designheight = hABLWindow1:HEIGHT-PIXELS.

       windowSize1 = NEW Size (hABLWindow1:WIDTH-PIXELS, hABLWindow1:HEIGHT-PIXELS).

       WindowContainer1:EmbeddedWindow = hABLWindow1.

       WindowContainer1:Size = windowSize1.

       WindowContainer1:Show( ).

       RUN enable_UI IN hABLProcedure1.

       RUN Init-prog IN hABLProcedure1.

       CATCH e AS Progress.Lang.Error:

           UNDO, THROW e.

       END CATCH.

END CONSTRUCTOR.

Posted by Matt Gilarde on 21-Mar-2018 08:54

It would be more helpful to create a standalone example that we can run to reproduce the issue.

Posted by bart.syryn on 23-Mar-2018 02:39

Hi,

It's not so easy to create a standalone version, this means I would need to make a menuform, etc.. Problem is also that it doesn't happen with every window...

I set:

-clientlog mylog.lg -logginglevel 3 -logentrytypes DB.Connects,4GLMessages,4GLTrans,4GLTrace,DynObjects.*,ProEvents.Other:4,TTStats,Temp-Tables

to see what happens.

I saw something, but I don' know if this could be the issue:

crorcrscandc is my first embedded window that calls crplanningform. crplanningform has a window-container to embed the ABL-window crplanning.

In the logging I see that crplanningform is called, loaded, etc, but then I see a lot of lines:

PROEVENTS      START COM CtrlFrame.CommandBars.Update  Handle:4047 crocrscandc T

Some pieces from the logging:

[18/03/23@08:19:16.461+0100] P-003924 T-008372 2 4GL PROEVENTS      START .NET crplanningform_Shown

[18/03/23@08:19:16.461+0100] P-003924 T-008372 3 4GL DYNOBJECTS     Created-Ref    .NET Object             Handle:4476 (login login @ 1142)  Pool:<unnamed> FROM login

[18/03/23@08:19:16.461+0100] P-003924 T-008372 2 4GL PROEVENTS      Begin-Trigger Invoke crplanningform_Shown crplanningform (Sender: crplanningform Handle:4219 )

[18/03/23@08:19:16.461+0100] P-003924 T-008372 3 4GL DYNOBJECTS     Created-Ref    .NET Object             Handle:4477 (crplanningform_Shown crplanningform @ 192)  Pool:<unnamed> FROM login

[18/03/23@08:19:16.461+0100] P-003924 T-008372 3 4GL DYNOBJECTS     Created-Ref    .NET Object             Handle:4478 (crplanningform_Shown crplanningform @ 192)  Pool:<unnamed> FROM login

[18/03/23@08:19:16.461+0100] P-003924 T-008372 2 4GL DYNOBJECTS     Deleted-by-GC  .NET Object             Handle:4477 (crplanningform_Shown crplanningform @ 192)

...

...

[18/03/23@08:19:16.535+0100] P-003924 T-008372 2 4GL PROEVENTS      End-Trigger crplanningform_Activated (Sender: crplanningform Handle:4219 )

[18/03/23@08:19:16.535+0100] P-003924 T-008372 2 4GL DYNOBJECTS     Deleted-by-GC  .NET Object             Handle:4533 (login login @ 1142)

[18/03/23@08:19:16.545+0100] P-003924 T-008372 4 4GL PROEVENTS      START COM CtrlFrame-4.G2antt.Event  Handle:4420 crplanning T

[18/03/23@08:19:16.545+0100] P-003924 T-008372 4 4GL PROEVENTS      START COM CtrlFrame-4.G2antt.BeforeDrawPart  Handle:4420 crplanning T

[18/03/23@08:19:16.546+0100] P-003924 T-008372 4 4GL PROEVENTS      START COM CtrlFrame-4.G2antt.Event  Handle:4420 crplanning T

[18/03/23@08:19:16.546+0100] P-003924 T-008372 4 4GL PROEVENTS      START COM CtrlFrame-4.G2antt.AfterDrawPart  Handle:4420 crplanning T

[18/03/23@08:19:16.583+0100] P-003924 T-008372 4 4GL PROEVENTS      START COM CtrlFrame-3.ReportControl.MouseMove  Handle:4419 crplanning T

[18/03/23@08:19:16.584+0100] P-003924 T-008372 4 4GL PROEVENTS      START COM CtrlFrame-3.ReportControl.MouseMove  Handle:4419 crplanning T

[18/03/23@08:19:16.584+0100] P-003924 T-008372 4 4GL PROEVENTS      START COM CtrlFrame-3.ReportControl.MouseMove  Handle:4419 crplanning T

[18/03/23@08:19:16.584+0100] P-003924 T-008372 4 4GL PROEVENTS      START COM CtrlFrame-3.ReportControl.MouseMove  Handle:4419 crplanning T

[18/03/23@08:19:16.584+0100] P-003924 T-008372 4 4GL PROEVENTS      START COM CtrlFrame-3.ReportControl.MouseMove  Handle:4419 crplanning T

[18/03/23@08:19:16.584+0100] P-003924 T-008372 4 4GL PROEVENTS      START COM CtrlFrame-3.ReportControl.MouseMove  Handle:4419 crplanning T

[18/03/23@08:19:16.585+0100] P-003924 T-008372 4 4GL PROEVENTS      START COM CtrlFrame-3.ReportControl.MouseMove  Handle:4419 crplanning T

[18/03/23@08:19:16.616+0100] P-003924 T-008372 4 4GL PROEVENTS      START COM CtrlFrame.CommandBars.Update  Handle:4047 crocrscandc T

[18/03/23@08:19:16.616+0100] P-003924 T-008372 4 4GL PROEVENTS      START COM CtrlFrame.CommandBars.Update  Handle:4047 crocrscandc T

[18/03/23@08:19:16.616+0100] P-003924 T-008372 4 4GL PROEVENTS      START COM CtrlFrame.CommandBars.Update  Handle:4047 crocrscandc T

[18/03/23@08:19:16.705+0100] P-003924 T-008372 4 4GL PROEVENTS      START COM CtrlFrame.CommandBars.Update  Handle:4047 crocrscandc T

[18/03/23@08:19:16.705+0100] P-003924 T-008372 4 4GL PROEVENTS      START COM CtrlFrame.CommandBars.Update  Handle:4047 crocrscandc T

[18/03/23@08:19:16.705+0100] P-003924 T-008372 4 4GL PROEVENTS      START COM CtrlFrame.CommandBars.Update  Handle:4047 crocrscandc T

[18/03/23@08:19:16.810+0100] P-003924 T-008372 4 4GL PROEVENTS      START COM CtrlFrame.CommandBars.Update  Handle:4047 crocrscandc T

[18/03/23@08:19:16.810+0100] P-003924 T-008372 4 4GL PROEVENTS      START COM CtrlFrame.CommandBars.Update  Handle:4047 crocrscandc T

[18/03/23@08:19:16.810+0100] P-003924 T-008372 4 4GL PROEVENTS      START COM CtrlFrame.CommandBars.Update  Handle:4047 crocrscandc T

[18/03/23@08:19:16.924+0100] P-003924 T-008372 4 4GL PROEVENTS      START COM CtrlFrame.CommandBars.Update  Handle:4047 crocrscandc T

[18/03/23@08:19:16.924+0100] P-003924 T-008372 4 4GL PROEVENTS      START COM CtrlFrame.CommandBars.Update  Handle:4047 crocrscandc T

[18/03/23@08:19:16.924+0100] P-003924 T-008372 4 4GL PROEVENTS      START COM CtrlFrame.CommandBars.Update  Handle:4047 crocrscandc T

[18/03/23@08:19:17.032+0100] P-003924 T-008372 4 4GL PROEVENTS      START COM CtrlFrame.CommandBars.Update  Handle:4047 crocrscandc T

[18/03/23@08:19:17.032+0100] P-003924 T-008372 4 4GL PROEVENTS      START COM CtrlFrame.CommandBars.Update  Handle:4047 crocrscandc T

[18/03/23@08:19:17.032+0100] P-003924 T-008372 4 4GL PROEVENTS      START COM CtrlFrame.CommandBars.Update  Handle:4047 crocrscandc T

[18/03/23@08:19:17.102+0100] P-003924 T-008372 4 4GL PROEVENTS      START COM CtrlFrame-3.ReportControl.MouseMove  Handle:4419 crplanning T

[18/03/23@08:19:17.110+0100] P-003924 T-008372 4 4GL PROEVENTS      START COM CtrlFrame-3.ReportControl.MouseMove  Handle:4419 crplanning T

[18/03/23@08:19:17.117+0100] P-003924 T-008372 4 4GL PROEVENTS      START COM CtrlFrame-3.ReportControl.MouseMove  Handle:4419 crplanning T

[18/03/23@08:19:17.126+0100] P-003924 T-008372 4 4GL PROEVENTS      START COM CtrlFrame-3.ReportControl.MouseMove  Handle:4419 crplanning T

I don't know what CtrlFrame.CommandBars.Update in crocrscandc is ....

This thread is closed