How to create a Basic4ppc library

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

  1. Erel

    Erel Administrator Staff Member Licensed User

    Creating libraries is pretty easy.
    It can be done using C# or VB .Net and using Visual Studio 2003 or 2005 (professional version).
    You should create a .Net CF class library.
    The library should include at least one public constructor (which will be converted to New1, New2...).
    You could use overloading (again, Basic4ppc will add the numbers as necessary).
    Basic4ppc will handle the data conversion of the following types:
    - Primitive types (int16, double, byte...).
    - String.
    - Control.
    - Stream.
    - Arrays of primitive types.
    - Color
    Events can also be used. See the attached example for the syntax of events.
    If the class implements the IDisposable interface, Basic4ppc will call the Dispose method when the application ends (making sure that all the resources are freed).

    If there is no need of a special function of .Net CF 2.0, it is better to target .Net CF 1.0 (to prevent the need to install .Net CF 2.0).
    Attached is the source code of the ScrollBar library.
    Please feel free to ask any question regarding the libraries.
     

    Attached Files:

  2. leo

    leo Member Licensed User

    Please,
    does somebody have an example of how to create a library for P4PPC in VB?
    regards
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    Attached is the VB version of the library.
    It doesn't include all the properties.
     

    Attached Files:

  4. leo

    leo Member Licensed User

    You are GREAT, Erel! :)
     
  5. leo

    leo Member Licensed User

    Hi,
    I cannot open the project in VB .net
    I have VB .Net standard 2003...
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    You need the professional version to create smart device projects.
     
  7. leo

    leo Member Licensed User

    Ok, but same I cannot open it!, will the project be well created?
     
  8. maXim

    maXim Active Member Licensed User

  9. Erel

    Erel Administrator Staff Member Licensed User

    I think that you can't (or that it is very complicated).
    You should check if it supports .Net CF development.
     
  10. maXim

    maXim Active Member Licensed User

    Thanks for Your answer Mr. Erel,
    Sigh... :(
    However I will try there!:cool:
     
  11. dzt

    dzt Active Member Licensed User

    you can with #develop

    Hi,

    You can make b4ppc libraries with #develop.
    Requires downloading from Microsoft .NET 2.0 Framework SDK (included in Visual Studio 2005).
    Visual Sttudio 2005 CF2 solutions (.sln) must be made from the beginning, as they does not work with #develop.
    Attached are scrollbar and vb-scrollbar examples for #develop.

    Dimitris
     

    Attached Files:

  12. leo

    leo Member Licensed User

    Very GOOD! :)
     
  13. maXim

    maXim Active Member Licensed User

    Hi Dimitris,

    Thanks for your contribution...

    Very GOOD! ;)
     
    Last edited: May 28, 2007
  14. gord

    gord New Member Licensed User

    The final build SharpDevelop 2.1 has support for compact.Net it also has an emulator
     
  15. Cableguy

    Cableguy Expert Licensed User

    Hi

    I've never used #C before so i really don't know how to go from here.any good tutorial on dll develop?
     
  16. dzt

    dzt Active Member Licensed User

    #develop has also support for VB.NET coding, not only C#. There is an option to convert C# projects to VB and vise versa.

    This thread is a good start to learn how to develop libraries for B4PPC. Start playing with the example projects posted here and when you are stuck ask for help as always we all do!
     
  17. Cableguy

    Cableguy Expert Licensed User

  18. dzt

    dzt Active Member Licensed User

    They are not talking about Compact Framework.

    But if you want to give it a try, I keep on saying to try with SharpDevelop.
    It is pretty easy and free.
     
  19. Cableguy

    Cableguy Expert Licensed User

    Dzt, thanks for your input...
    I keep strugling to get hold of an easy to understand tutorial, describing what things are, in oposition to "do it this way"....
    Kinda of a simple sintax explanation and structure of the dll creation...

    Could you crreate such a simple tutorial from your experience?
     
  20. dzt

    dzt Active Member Licensed User

    Ok CableGuy,

    I'll try to "teach you" (It's my first time through a forum) in easy steps how to make a simple inputbox library but since I'm very busy at the moment, I can't promise for the time.
     
Loading...