How to create a Basic4ppc library

Discussion in 'Code Samples & Tips' started by Erel, May 1, 2007.

  1. dzt

    dzt Active Member Licensed User

    Yes, unfortunately this is a typical behaviour of #develop. Visual Studio which I mainly use is better by far and lacks such a issues.

    But #develop is free and has the ability to easily change the target .NET platform.
     
  2. obrienj

    obrienj Member Licensed User

    Well, I just discovered that Reflector points out where things are being used that Net CF doesn't support, so I will rely on that.

    As I'm retired and not running a business any more, Visual Studio is out of the question. To bad MS doesn't support some of this in the Express Editions.

    Regards,
    Jim
     
  3. agraham

    agraham Expert Licensed User

  4. obrienj

    obrienj Member Licensed User

    agraham,

    Thanks for taking the time to offer the pointers. They explained everything or should I say sent be back to a place I had been in my Java years. Does "better mousetrap" ring a bell.

    This is truely amusing for me. After all of the years of "...compiled VB is better than interpreted Java." We come to this.

    Maybe Sun was right all along. Marketing does wonders for the bottom line.

    I have seen so many of these in 45 years:

    flat address space vs segmented
    IBM SNA vs Packet Switching
    Compiled vs interpreted
    propriatary systems vs Open Systems
    Object-only code vs open source ​

    and that's just a few of them.

    OK, the old guy will shutup ad go to breakfast.

    Regards,
    Jim
     
  5. moster67

    moster67 Expert Licensed User

    Compiling library

    I am just wondering if it is possible to compile a library (using Visual Studio) that includes code both in Visual Basic and in C# ??

    Thanks.

    Rgds,
    moster67
     
    Last edited: Sep 13, 2008
  6. Erel

    Erel Administrator Staff Member Licensed User

    No. You can however compile one type of code as dll file and then reference this dll in the other project.
     
  7. Louis

    Louis Active Member Licensed User

    Hi. ow can I hide classes that my library needs but that don't need to be called by Basic4ppc? Should I just change its scope from Public to Private? Thanks.
     
  8. agraham

    agraham Expert Licensed User

    Making them Private doesn't work. Prepend their names with an underscore like "_Hidden" and Basic4ppc ignores them.
     
  9. Filippo

    Filippo Expert Licensed User

    Hi agraham,

    this is super! I've long sought.:sign0060:

    Ciao,
    Filippo
     
  10. moster67

    moster67 Expert Licensed User

    Interesting...I will try and see if this works in VB.NET as well.



     
  11. agraham

    agraham Expert Licensed User

    It will! It's the Basic4ppc library loading code that ignores classes beginning with underscores and it doesn't know, or care, what language generated the library. For some reason Erel wrote Basic4ppc to load both Public and Private classes from a library (backward compatibility maybe) but then added the "ignore underscore" code later so that stuff that you don't want to see in "Add Object" can be hidden although, and especially with VB.NET, on larger libraries you may get some classes that the compiler of the library has added showing up.
     
  12. stratus

    stratus Active Member Licensed User

    Trying to write a mine control for basic4ppc i try the scrollbar example of Erel.I open the class in visual studio 2008 and i build it without change anything.When i try to load the dll in a basic4ppc project this error message appears "An error occured.Unable to load one or more of the requested types.Retrieve the LoaderExceptions property for more information."What am i doing wrong;
     
  13. Erel

    Erel Administrator Staff Member Licensed User

    Can you upload the dll (zip it first)?
     
  14. stratus

    stratus Active Member Licensed User

    Here it is erel.I forgot to write that i use the vb example
     

    Attached Files:

  15. Erel

    Erel Administrator Staff Member Licensed User

    It works on the desktop. Does it fail on the device? Did you choose a "Smart device" project?
     
  16. agraham

    agraham Expert Licensed User

    It works fine on my iPAQ 214 as well. :confused:
     
    Last edited: Apr 24, 2010
  17. stratus

    stratus Active Member Licensed User

    I restart the pc and everything is ok now (very curious indeed) Thank's Erel and Agraham
     
  18. Louis

    Louis Active Member Licensed User

    Hi. How can I get rid of the MyProject class that keeps showing up in my Visual Basic.net project? I'm using Visual Studio 2008, and because there is already a DLL added that has a MyProject class in it Basic4ppc says that a key with myproject was added. Thanks.
     
  19. agraham

    agraham Expert Licensed User

    I'm afraid that you can't, that is part of the baggage that VB automatically puts in dlls and exes. The only solution is to switch to C# which usually doesn't include extra classes in the compilation.
     
  20. Louis

    Louis Active Member Licensed User

    Thank goodness I know C# then. Will do. Thanks.
     
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