Using of OpenFileDialog

APL-related discussions - a stream of APL consciousness.
Not sure where to start a discussion ? Here's the place to be
Forum rules
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !
Post Reply
nikll
Posts: 13
Joined: Sat Oct 17, 2015 1:35 pm

Using of OpenFileDialog

Post 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.
nikll
Posts: 13
Joined: Sat Oct 17, 2015 1:35 pm

Re: Using of OpenFileDialog

Post by nikll »

Sorry, forget to mention that I use:
Version: 14.1.28415.0 64 Unicode
User avatar
PGilbert
Posts: 440
Joined: Sun Dec 13, 2009 8:46 pm
Location: Montréal, Québec, Canada

Re: Using of OpenFileDialog

Post 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
nikll
Posts: 13
Joined: Sat Oct 17, 2015 1:35 pm

Re: Using of OpenFileDialog

Post by nikll »

You are right, it looks like this is my internal issue.

Thanks a lot.
Vince|Dyalog
Posts: 439
Joined: Wed Oct 01, 2008 9:39 am

Re: Using of OpenFileDialog

Post 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
Post Reply