I'm getting an error

Discussion in 'Questions (Windows Mobile)' started by Ricky D, Oct 12, 2008.

  1. Ricky D

    Ricky D Well-Known Member Licensed 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
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Make sure that the device IDE runs with .Net CF 2.0.
    You can check it by clicking on File - Help - About.
     
  3. Ricky D

    Ricky D Well-Known Member Licensed 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
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    Can you post the library source code + compiled dll?
     
  5. Ricky D

    Ricky D Well-Known Member Licensed User

    Erel, here's the code and dll

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

    Erel Administrator Staff Member Licensed User

    I'm sorry but I've looked at your code and I don't know what causes this problem.
    For some reason Visual Studio or the VB .Net compiler add some classes (related to the My namespace I think) that may cause this problem.
    You can see these classes under Add Object menu.
     
  7. agraham

    agraham Expert Licensed 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!)).
     
  8. Erel

    Erel Administrator Staff Member Licensed User

  9. Ricky D

    Ricky D Well-Known Member Licensed 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: Oct 15, 2008
  10. agraham

    agraham Expert Licensed User

    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.

    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: Oct 15, 2008
  11. Ricky D

    Ricky D Well-Known Member Licensed User

    c#

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

    I'd be curious to try it.

    regards, Ricky
     
  12. agraham

    agraham Expert Licensed User

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice