I'm getting an error

Ricky D

Well-Known Member
Licensed User
Longtime User
I created a dll for an autocomplete combobox.

The app runs and compiles fine on the desktop.

The compiled exe runs fine on the device.

When I copy the source code onto the device and try to open it from the device IDE I get this error

An error occurred.
NotSupportedException

any ideas?

regards, Ricky
 

Ricky D

Well-Known Member
Licensed User
Longtime User
Erel,

I'm running 6.30 of B4PPC and .Net 2.0.7045

regards, Ricky

p.s the dll was compiled as a windows mobile class file using vb5 - like in the scrollbar example
 

Ricky D

Well-Known Member
Licensed User
Longtime User
Erel, here's the code and dll

Attached is a zip file with the .vb code and the dll
 

agraham

Expert
Licensed User
Longtime User
A VB project upgraded from a VS2003 project like the Scrollbar example doesn't have this problem - it also doesn't have the MyProject object! I have no idea how, or even if it is possible, to remove this from a VS2005 project started from scratch.

I assume you are using VS2005. Here is your code in a VS2005 project upgraded from the Scrollbar example. You could copy it, do some renaming and use it for another library (or you could learn C#! (or try SharpDevelop if you insit on VB!)).
 

Erel

B4X founder
Staff member
Licensed User
Longtime User

Ricky D

Well-Known Member
Licensed User
Longtime User
ummm

Thanks for trying agraham - vs2005 adds the my project object and it can't be deleted.

I compiled the dll using your code and b4ppc on my device isn't complaining about it so go figure - i'll do some more testing but that seems to have done it.

One difference between yours and mine is the AssemblyInfo - maybe that's what gets it working.

Why would I need to use C#? I'm not sure I could unless i can get some very good free documentation on how to program in it.

regards, Ricky

EDIT: I copied your assembly info, deleted the one VB2005 created and it compiles and the device is happy.
Many thanks

sorry to say mine does the same as it did b4. i'm using yours agraham
 
Last edited:

agraham

Expert
Licensed User
Longtime User
Why would I need to use C#? I'm not sure I could unless i can get some very good free documentation on how to program in it.
C# produces "cleaner" assemblies than VB which litters them with extra classes that show up as objects in B4ppc libraries, mind you C# also does that sometimes but only with complicated code. The difference in writing code is only really one of syntax as all the .NET objects and properties are the same and are accessed with the same synax. I switched from VB to C# several years ago as I found that the VB syntax had become too verbose and was getting in my way of producing good code. C# is much more concise. I did have a head start as I programmed commercially in C some years before.

EDIT: I copied your assembly info, deleted the one VB2005 created and it compiles and the device is happy.
Many thanks
Well spotted! I had looked inside them and (apparently wrongly :() decided that I couldn't see anything that would make a difference. it would be interesting to know what causes that but I haven't the time at the moment to investigate as the issue does not affect me so the interest is out of curiousity not necessity. If I were writing in VB I would certainly invesitagate further.
 
Last edited:

Ricky D

Well-Known Member
Licensed User
Longtime User
c#

so agraham, do you know of any decent free doco on programming c#?

I'd be curious to try it.

regards, Ricky
 
Top