How do I develop Delphi Prism .NET applications that manage profiles?
Last reviewed: 8/7/2009
HOW Article ID: H080905
The information in this article applies to:
- ProfileKit 3
Summary
If you love the features of .NET class libraries and love Delphi, then Delphi Prism is for you.
In ProfileKit 3, new Delphi Prism .NET samples have been added to illustrate managing profiles with Delphi Prism.
More Information
The Chant ProfileKit 3 Win32 Developer Edition includes v1.1, v2, and v3 compiled ProfileKit class libraries. The Chant ProfileKit 3 WinCE Developer Edition includes cf2 compiled ProfileKit class libraries.
Within a Delphi Prism project, add the Chant.ProfileKit class library to your project with the following steps:
- highlight the References folder;
- press the right mouse button and select the Add Reference menu item;
- browse to the applicable version of the component libraries Chant.ProfileKit.DLL and Chant.Shared.DLL found in C:\Program Files\Chant\ProfileKit 3\Win32 Developer\NETv1.1\bin, C:\Program Files\Chant\ProfileKit 3\Win32 Developer\NETv2\bin or C:\Program Files\Chant\ProfileKit 3\Win32 Developer\NETv3\bin; and
- click OK to add the reference to your project.
Add Chant.ProfileKit and Chant.Shared to the Uses statement in your application to reference the ProfileKit classes and members within your code.
You declare the NChantPM object as follows:
// Declare global type variable for your class object as part of your Form or Window declaration
NChantPM1: NChantPM;
// Declare public procedure for your event handler
public
method NChantPM1_HasEvent(sender: System.Object; e: HasEventArgs);
You instantiate your class objects and add and event handers for the objects as follows:
// In your Form or Window constructor, instantiate your class object
NChantPM1 := new NChantPM(self);
// Add reference to your event handler
NChantPM1.HasEvent += new NChantPM.HasEventHandler(NChantPM1_HasEvent);
Delphi Prism sample projects are installed at [My] Documents\Chant ProfileKit 3\NETv2\VS2008\Delphi and [My] Documents\Chant ProfileKit 3\NETv3\VS2008\Delphi.