Setting ActiveX properties

Phil
08-18-2000, 10:00 AM
Hi,
I'm a newcomer to using the API but it would appear to me that it may be possible to set a property of an ActiveX component embedded in an application from another application. If it is I could do with some hints. The situation I have is as follows.

The activeX component is MapX (from MapInfo) which adds a map to a form, two of the properties are: Map1.CenterX and Map1.CenterY which when set recenter the map object. I want to be able to set these properties from another application (basically a database front-end containing X, Y pairs), is this possible?

Thanks in anticipation of your help

Phil

anhmytran
08-21-2000, 10:46 PM
What does it mean by saying 'set these properties from another application?'

If your application makes sense, I am able to help you.

AnhMy_Tran

Phil
08-30-2000, 06:36 AM
Thanks for the reply, I've been out of the office so this reply is a little delayed but if you can still help it would be appreciated.

I have written an application that contains the ActiveX component MapX (see previous post) the coordinates of the center of the map can be set using the properties CenterX and CenterY. So for instance I can have the user type coordinates into text boxes and use the following code to recenter the map Map1:

Map1.CenterX = Val(text1.text)
Map1.CenterY = Val(text2.text)

(Roughly, but you get the idea!)

The second indepentant application which I am developing returns pairs of X and Y coordinates from a database of addresses and I wish to use this data to recenter the map in the first application.

The question is can I use the API to do this.

Thanks in anticipation of your help

Phil

anhmytran
08-31-2000, 12:16 AM
Everything you said is reasonablly possible.
Please, share with me your ActiveX and API.

Good luck.

AnhMy_Tran

Phil
09-06-2000, 11:11 AM
Hi,
I notice this post has a number of hits so thought I'd post a note to say I got a method to work (very well). I used the SendMessage function with the WM_COPYDATA structure in the sending application and hooking the message received by the second application. I could then simply split the received string and assign the parts to the corresponding properties.

I can post the code if anyone is interested enough.

Thanks for your attention
Phil

Flamelord
09-28-2000, 09:55 AM
Would compiling the first EXE as an ActiveX EXE solve your problem? This way a user could run the app as well as you have the ability to create an object type of the application.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum