Question About []USING - Part 2
7 posts
• Page 1 of 1
Question About []USING - Part 2
There is something that I don't understand. To access the dll used to create a Window in WPF (PresentationFramework.dll) you need to specify a directory because it is not store with the other dll of .Net 4.0.
I have been doing the following to reach that dll:
I have seen Dyalog used instead of the above the following (that seems to be working very well and much simplier):
I don't have any directory called 'WPF' with PresentationFramework.dll in it and still the last ⎕USING is working anyway. Why is that ?
Thanks in advance
I have been doing the following to reach that dll:
⎕USING←'System,mscorlib.dll'
progFiles←Environment.GetFolderPath Environment.SpecialFolder.ProgramFiles
_NetPath←progFiles,'\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\'
⎕USING←'System.Windows,',_NetPath,'PresentationFramework.dll'
⎕NEW Window
System.Windows.Window
I have seen Dyalog used instead of the above the following (that seems to be working very well and much simplier):
⎕USING←'System.Windows,WPF/PresentationFramework.dll'
⎕NEW Window
System.Windows.Window
I don't have any directory called 'WPF' with PresentationFramework.dll in it and still the last ⎕USING is working anyway. Why is that ?
Thanks in advance
-
PGilbert - Posts: 436
- Joined: Sun Dec 13, 2009 8:46 pm
- Location: Montréal, Québec, Canada
Re: Question About []USING - Part 2
Pierre,
I am sure you have a directory called WPF. It is usually under the default directory that Dyalog uses to load the dlls.
This default is the reason you don't have to specify a directory for the others.
If you specify an incorrect path in the []using and tryt and access the dll. The status window will say ....cannot find "directory" file. I would be very surprised if the WPF directory is not under this directory since that is how I discovered it to work under my machine. Microsoft placed some of the WPF .net stuff into the sub directory WPF after Dyalog decided on their default.
I am sure you have a directory called WPF. It is usually under the default directory that Dyalog uses to load the dlls.
This default is the reason you don't have to specify a directory for the others.
If you specify an incorrect path in the []using and tryt and access the dll. The status window will say ....cannot find "directory" file. I would be very surprised if the WPF directory is not under this directory since that is how I discovered it to work under my machine. Microsoft placed some of the WPF .net stuff into the sub directory WPF after Dyalog decided on their default.
-
MikeHughes - Posts: 86
- Joined: Thu Nov 26, 2009 9:03 am
- Location: Market Harborough, Leicestershire, UK
Re: Question About []USING - Part 2
I think Pierre is onto something, I certainly find that I'm having to tweak the "folder" part of ⎕USING to something different than I see in various postings here.
When I look at Microsoft .NET documentation it seems to take folders for granted.
Something which would be useful (at least in my opinion) would be a writeup of which folders we ought to be using (and I'm wondering whether it depends on OS version). It's the sort of bridge-building which can make using Microsoft's words so much more straightforward - I think they ought to have done it, but maybe I just don't know where to look in the torrent of words.
When I look at Microsoft .NET documentation it seems to take folders for granted.
Something which would be useful (at least in my opinion) would be a writeup of which folders we ought to be using (and I'm wondering whether it depends on OS version). It's the sort of bridge-building which can make using Microsoft's words so much more straightforward - I think they ought to have done it, but maybe I just don't know where to look in the torrent of words.
Visit http://apl.dickbowman.com to read more from Dick Bowman
-
Dick Bowman - Posts: 235
- Joined: Thu Jun 18, 2009 4:55 pm
Re: Question About []USING - Part 2
Hello Michael, I was hoping to learn that 'WPF' was a special keyword that finds for us the WPF directory, but looks like its not the case from your answer. If I do a search for 'PresentationFramework.dll' on my computer I get five hits located like this:
1- C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.0
2- C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0
3- C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client
4- C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v3.5\Profile\Client
5- C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0
None of them have 'WPF' directory or sub-directory in it. Could you tell us in wich directory with a 'WPF' in it that you have it in your computer because I can't find it on mine.
Pierre Gilbert
1- C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.0
2- C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0
3- C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client
4- C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v3.5\Profile\Client
5- C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0
None of them have 'WPF' directory or sub-directory in it. Could you tell us in wich directory with a 'WPF' in it that you have it in your computer because I can't find it on mine.
Pierre Gilbert
-
PGilbert - Posts: 436
- Joined: Sun Dec 13, 2009 8:46 pm
- Location: Montréal, Québec, Canada
Re: Question About []USING - Part 2
Hi Pierre and Michael,
On my computer, PresentationFramework.dll is here:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\WPF\PresentationFramework.dll
I ran the .NET Framework setup verification tool and it says that I have the following installed:
[05/21/15,12:06:20] Install state for .NET Framework 4 Client: installed with no service packs.
[05/21/15,12:06:20] Install state for .NET Framework 4 Full: installed with no service packs.
Regards,
Vince
On my computer, PresentationFramework.dll is here:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\WPF\PresentationFramework.dll
I ran the .NET Framework setup verification tool and it says that I have the following installed:
[05/21/15,12:06:20] Install state for .NET Framework 4 Client: installed with no service packs.
[05/21/15,12:06:20] Install state for .NET Framework 4 Full: installed with no service packs.
Regards,
Vince
- Vince|Dyalog
- Posts: 413
- Joined: Wed Oct 01, 2008 9:39 am
Re: Question About []USING - Part 2
For the record, I find PresentationFramework.dll in the same folder as Vince and also (same vital statistics) in Framework64 (rest of folder name the same).
Things do seem a little messy in .NETland.
Things do seem a little messy in .NETland.
Visit http://apl.dickbowman.com to read more from Dick Bowman
-
Dick Bowman - Posts: 235
- Joined: Thu Jun 18, 2009 4:55 pm
Re: Question About []USING - Part 2
Thanks Vince, I have found also this WPF sub-directory on my computers.
-
PGilbert - Posts: 436
- Joined: Sun Dec 13, 2009 8:46 pm
- Location: Montréal, Québec, Canada
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group