.NET Calls to Image
4 posts
• Page 1 of 1
.NET Calls to Image
I am having problems with some .NET code. I am trying to create an imagelist that I want to assign to a DevExpress Ribbon Control.
The last line does not work. I have tried variants of the last line
I have also tried to create a string
What am I doing wrong? Also, is there sample code that shows how to use the ribbon control from DevExpress?
- Code: Select all
⎕USING←'System'
⎕USING,←⊂'System.Windows.Forms,system.windows.forms.dll'
⎕USING,←⊂'System.Drawing,system.drawing.dll'
⎕USING,←⊂'System.ComponentModel,system.dll'
ILIST←⎕NEW ImageList
IMAGE←⎕NEW Image.FromFile'C:\TEMP\TEXT.BMP'
The last line does not work. I have tried variants of the last line
- Code: Select all
IMAGE←⎕NEW Image.FromFile⊂'C:\TEMP\TEXT.BMP' ⍝ does not work
IMAGE←⎕NEW Image.FromFile,⊂'C:\TEMP\TEXT.BMP' ⍝ does not work
I have also tried to create a string
- Code: Select all
S←⎕NEW String (⊂'C:\TEMP\TEXT.BMP' )
S
C:\TEMP\TEXT.BMP
I←⎕NEW Image.FromFile S ⍝ does not work
What am I doing wrong? Also, is there sample code that shows how to use the ribbon control from DevExpress?
- neeraj
- Posts: 82
- Joined: Wed Dec 02, 2009 12:10 am
- Location: Ithaca, NY, USA
Re: .NET Calls to Image
Image.FromFile is a method, not a class. So what you need is:
Since v11.0, you have to enclose single string arguments in order to disambiguate from a single character array argument; we found some methods which took both "overloads".
In APL#, "C:\TEMP\TEXT.BMP" (in double quotes) will be a string (a scalar), and 'C:\TEMP\TEXT.BMP' will continue to be a "character vector". We may introduce the same distinction in Dyalog APL in a future release, it realy helps you work with other languages if you can distinguish between the two.
Regarding DevExpress, I don't have any code but they have given me an evaluation copy in return for my investigating the product and writing up some examples of how to use it with APL. I would be very interested in hearing from you regarding your progress, and happy to help you look at examples which are not working, to see if there is anything Dyalog can do to help.
- Code: Select all
IMAGE←Image.FromFile ⊂'C:\TEMP\TEXT.BMP'
IMAGE
System.Drawing.Bitmap
Since v11.0, you have to enclose single string arguments in order to disambiguate from a single character array argument; we found some methods which took both "overloads".
In APL#, "C:\TEMP\TEXT.BMP" (in double quotes) will be a string (a scalar), and 'C:\TEMP\TEXT.BMP' will continue to be a "character vector". We may introduce the same distinction in Dyalog APL in a future release, it realy helps you work with other languages if you can distinguish between the two.
Regarding DevExpress, I don't have any code but they have given me an evaluation copy in return for my investigating the product and writing up some examples of how to use it with APL. I would be very interested in hearing from you regarding your progress, and happy to help you look at examples which are not working, to see if there is anything Dyalog can do to help.
-
Morten|Dyalog - Posts: 454
- Joined: Tue Sep 09, 2008 3:52 pm
Re: .NET Calls to Image
Thanks. Digging deeper I see that Image is an abstract class so cannot be used to create an object.
Morton, I have sent you a workspace with some sample code.
Thanks
Neeraj
Morton, I have sent you a workspace with some sample code.
Thanks
Neeraj
- neeraj
- Posts: 82
- Joined: Wed Dec 02, 2009 12:10 am
- Location: Ithaca, NY, USA
Re: .NET Calls to Image
Morton:
I have spent a couple of days on the ribbon toolbar and I am stuck. I have not found a way to assign a popup menu to a dropdown button or to assign a SuperTip to a button item. Since the ribbon toolbar is of general public use I am wondering if Dyalog can post some sample code showing how to use the most common features of the DevExpress ribbon toolbar.
Thanks
Neeraj
I have spent a couple of days on the ribbon toolbar and I am stuck. I have not found a way to assign a popup menu to a dropdown button or to assign a SuperTip to a button item. Since the ribbon toolbar is of general public use I am wondering if Dyalog can post some sample code showing how to use the most common features of the DevExpress ribbon toolbar.
Thanks
Neeraj
- neeraj
- Posts: 82
- Joined: Wed Dec 02, 2009 12:10 am
- Location: Ithaca, NY, USA
4 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