Page 1 of 1

How to set an IWin32Window value?

PostPosted: November 2nd, 2014, 2:27 pm
by Ajay Askoolum
The C# code is using this as the argument to a function that calls a dialog.
Code: Select all
if (frm.ShowDialog(this)== DialogResult.OK)

this is a value of type System.Windows.Forms.IWin32Window.

That is, the dialog being called is modal, disallowing interaction with the environment that is this.

How can I assign '#' []wi 'hwndmain' to a variable of type System.Windows.Forms.IWin32Window?

The aim is to make the dialog disallow interaction with the APL+Win environment.

Re: How to set an IWin32Window value?

PostPosted: November 5th, 2014, 5:17 am
by joe_blaze
Hi Ajay:

Three thoughts:
APL+Win supports only Int32, double, string and bool data types
So you may be able to pass []wi 'hwndmain' as an integer to the C# side and
Convert that C# integer to System.IntPtr on the C# side.

I imagine that you are trying create a C# GUI and not have it interact with the APL+Win developer session or
even use a C# GUI control in an APL+Win form and use that in an APL+Win developer session. If that is the case,
be aware that the APL+Win developer session is designed to specially route events so that applications can be debugged in APL+Win.
You might try testing your application in APL+Win runtime where there is no special event routing by APL+Win.

It would be best if you provided some sample code which illustrates what you are trying to do, so that a better
analysis can be done.

Joe Blaze