How to set an IWin32Window value?

General discussions related to using the C# Script Engine in APL+Win.

Moderators: Tech Support, phpbb_admin

How to set an IWin32Window value?

Postby Ajay Askoolum » November 2nd, 2014, 2:27 pm

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.
Ajay Askoolum
 
Posts: 884
Joined: February 22nd, 2007, 2:16 am
Location: United Kingdom

Re: How to set an IWin32Window value?

Postby joe_blaze » November 5th, 2014, 5:17 am

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
joe_blaze
 
Posts: 384
Joined: February 11th, 2007, 3:09 am
Location: Box 361 Brielle, NJ 08730-0361


Return to APL+Win & The C# Script Engine

Who is online

Users browsing this forum: No registered users and 10 guests

cron