English

FAQ: Can I control ArcPad from another Application?

Question

Can I control ArcPad from another Application?

Answer

ArcPad does not have any ActiveX or .NET controls/components.

Below are several approaches that can be implemented to communicate between ArcPad and another Windows CE/Desktop Windows application:

* Use the Application.Run method in an ArcPad script to run the other application and optionally pass parameters.

* Use a flat text or binary file to exchange data between ArcPad and the other application.

* Compile the application as an ActiveX component and use the VBScript CreateObject method to create an instance of the ActiveX object. Then access the objects properties/methods via scripts in ArcPad.

* Create an intermediate ActiveX component that both ArcPad and the application can communicate with to exchange data/information.

* Use the methods in the System object in an ArcPad script to get the hWnd of another application and use it to send/post Windows messages or control the application window. (minimize, maximize, activate) VB/VBCE applications will need to use Declares to access these Windows APIs, while C++ CE applications can access Windows APIs directly.

* Use the WM_COPYDATA Windows message to send script commands to ArcPad via another application. Again, VB/VBCE applications will need to use Declares to access these Windows APIs, while C++ CE apps can access Windows APIs directly.

* Use PostMessage and WM_ARCPAD_EXEVENT to post an external event to ArcPad. This will fire an OnExEvent in ArcPad which can be trapped by a script in ArcPad.