Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > API > Setting ActiveX properties


Reply
 
Thread Tools Display Modes
  #1  
Old 08-18-2000, 10:00 AM
Phil
Guest
 
Posts: n/a
Question Setting ActiveX properties


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


Reply With Quote
  #2  
Old 08-21-2000, 10:46 PM
anhmytran anhmytran is offline
Senior Contributor

Retired Moderator
* Guru *
 
Join Date: Aug 1999
Location: Hartford, Connecticut, 06
Posts: 1,487
Default Re: Setting ActiveX properties

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
Reply With Quote
  #3  
Old 08-30-2000, 06:36 AM
Phil
Guest
 
Posts: n/a
Default Re: Setting ActiveX properties

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






Reply With Quote
  #4  
Old 08-31-2000, 12:16 AM
anhmytran anhmytran is offline
Senior Contributor

Retired Moderator
* Guru *
 
Join Date: Aug 1999
Location: Hartford, Connecticut, 06
Posts: 1,487
Default Re: Setting ActiveX properties

Everything you said is reasonablly possible.
Please, share with me your ActiveX and API.

Good luck.

AnhMy_Tran
Reply With Quote
  #5  
Old 09-06-2000, 11:11 AM
Phil
Guest
 
Posts: n/a
Default Re: Setting ActiveX properties

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

Reply With Quote
  #6  
Old 09-28-2000, 09:55 AM
Flamelord
Guest
 
Posts: n/a
Lightbulb Re: Setting ActiveX properties

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.

Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->