*Create a simple library*

Back to the start
Back to the libraries overview



From the B4PPC forum:

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).

Erel mentioned this here:
www.basic4ppc.com/forum/showthread.php?t=35