How to run .Net form non modal

Posted by joey eisma on 26-Sep-2018 11:17

Hi,

I have a .net form that needs to be able to be run multiple instances when a button is clicked.

With Application:Run(), it runs modal. With Show(), ABL complains with 13967.

Any thoughts?

Thanks!

All Replies

Posted by Mike Fechner on 26-Sep-2018 11:28

The very first (and hopefully only) WAIT-FOR in your application can be
 
WAIT-FOR System.Windows.Forms.Application:Run ()
 
/* no argument passed to Run() */
 
Then you can run .NET Forms non modally using the Show() method.
 
To leave the application, you’ll need to call
 
System.Windows.Forms.Application:Exit().

Posted by joey eisma on 26-Sep-2018 11:53

Hi,

Unfortunately, there is WAIT-FOR from the ABL main window (a legacy app).

Work around this requirement by creating a prowin32 process every time the open button is clicked.

Perhaps there is another way?

Thanks!

Posted by Mike Fechner on 26-Sep-2018 12:00

I thought that was the case.
 
But you should really replace that one wait-for statement in the legacy Window. Has been done millions of times before.

Posted by joey eisma on 26-Sep-2018 12:07

I did replace the wait-for in the main window with Application:Run().

However, there are events that didn't fire after that change. I'm wary of the other issues that could raise.

Posted by Mike Fechner on 26-Sep-2018 12:20

Which events and which OpenEdge release?

Posted by joey eisma on 26-Sep-2018 12:33

Hi.

While digging for those events that don't fire after the change. Also notice that after Show(), the .Net form goes behind the main ABL form. How to put the .Net form instance on top everytime it's run?

Thanks!

Posted by joey eisma on 26-Sep-2018 12:35

oh, sorry, OE 10.B.

"entry" for one didn't fire. If I do apply 'entry' before Application:Run(), seems to work.

Posted by Mike Fechner on 26-Sep-2018 12:40

I assume, that’s 10.2B. Try this on 10.2B08 or better on 11.7.3.007
 
Some of those issues may be fixed in more recent OpenEdge releases. 10.2B was released a decade ago.

Posted by joey eisma on 26-Sep-2018 12:46

Actually, tried to run this app with 11.7, came with problems. Gave us the thought there may be other issues. So held off the upgrade.

This is the thing with legacy apps. They remain legacy forever (?).

Thanks for your time Mike.

Posted by Mike Fechner on 26-Sep-2018 14:30

We have solved a number of issues with the integration of classic ABL GUI and GUI for .NET in our WinKit tool. Let me know if we should have a chat offline.

This thread is closed