Problem: How To use the SatForms ActiveSync control with Delphi
Solution: Delphi 6-7 Step by Step
1. Select Menu tools/env. options
2. Select Type Library Tab and check "Can Create" Option
Click OK
3. Select Menu Component - Import Activex Control
Click Install
The activex will be Installed and will be available at the Selected Component palette location (here ActiveX)
Now be sure that Microsoft Active Sync is active
Open your form
Add the activex (TSFAxPPC61)
For The activex to be created you must Use it at least once ( or the events will not fire )
Click the events
OnCreate
Create an Event Procedure (here OnCreate)
Add the Code:
procedure TForm1.OnCreate(Sender: TObject);
var
S: string;
begin
S:=SFAxPPC611.OleObject.LastErrorText;;
end;
Watch the Oleobject part of the string. This must be used when referring the functions and procedures in the SFAxPPC611 object. There is a slight difference in using this object in opposite to normal Delphi objects because you must reference the Oleobject as part of the object calls.
This is all. You can use it and the events will fire.
In previous Delphi versions:
Use File|Open, set the filter to Type Library files, open the SFrmAxPPC61.ocx in the windows\system32 directory , and have a look at the CanCreate flag in the type library editor. Set it to true, save the typelibrary as SatelliteFormsActiveSync_TLB.TLB , and try importing that.
This article was contributed by Jorn Johanneson, based on a similar HowTo from PDA-TECH on their TopSync OCX.
Keywords: Delphi, ActiveSync, PocketPC
KB ID: 10025
Updated: 2008-05-16
Satellite Forms KnowledgeBase Online