Page 1 of 1

Using of OpenFileDialog

Posted: Sat Nov 12, 2016 8:28 pm
by nikll
Hi.
Following code works fine in older Windows versions

Code: Select all

   ⎕USING←'System'
   ⎕USING,←⊂'System.Windows.Forms,system.windows.forms.dll'
   filebox←⎕NEW OpenFileDialog
   filebox.ShowDialog ⍬


But it does crash in Windows 10

Does anybody know what's wrong? Is it Dyalog APL error or improper using of Windows API?
Would be thankful for help.

Re: Using of OpenFileDialog

Posted: Sat Nov 12, 2016 8:37 pm
by nikll
Sorry, forget to mention that I use:
Version: 14.1.28415.0 64 Unicode

Re: Using of OpenFileDialog

Posted: Sun Nov 13, 2016 1:14 pm
by PGilbert
I have tried your code on a computer with Windows 10 and it is working with Dyalog v14.1 and v15. I have contributed some code on the APLWiki here and here for OpenFileDialog in case you want to try it. Otherwise we will need an error message to troubleshoot the problem.

Regards,

Pierre Gilbert

Re: Using of OpenFileDialog

Posted: Sun Nov 13, 2016 6:44 pm
by nikll
You are right, it looks like this is my internal issue.

Thanks a lot.

Re: Using of OpenFileDialog

Posted: Mon Nov 14, 2016 1:29 pm
by Vince|Dyalog
Hi Nikll,

I have 2 suggestions that I think will help:

1) Dyalog 14.1 needs the Microsoft Visual C++ 2005 Runtime DLLs.

You can download them from here http://www.microsoft.com/en-us/download/details.aspx?id=21254 and install them.

Restart your computer and see if that has helped.

2) Ensure that Dyalog knows to use .NET Framework 4.

Right click on the shortcut that starts Dyalog.

Go to Options→Configre→.NET Framework.

Ensure that the box is ticked and v4 is chosen.

Restart Dyalog and see if it works.

If these 2 suggestions don't help, please email me at Dyalog Support.

Regards,

Vince