Scott,
The way to keep the MBX open would be to include an event handler
subroutine (such as RemoteQueryHandler) in it. This will cause the MBX
to stick around until you tell it to close. As for using the global
variable in VB from this MBX, you can query the value, and, I believe,
set the value of specific elements of the array only. If you want to
manipulate the entire array at once you'll need to do it through your
MapBasic program. For example, if you wanted to use the Create Ranges
statement, you would need to do something like this:
Declare Function RemoteQueryHandler() As String
Declare Sub CreateRanges
Global themRanges() as Float
Function RemoteQueryHandler() As String
Dim sCmd as String
sCmd = CommandInfo(CMD_INFO_MSG)
If sCmd = "RANGES" Then
Call CreateRanges
End If
End Function
Sub CreateRanges
Create Ranges From MyTable With MyVar Use "Equal Ranges" Into
Variable themRanges
End Sub
Gary.
Scott England wrote:
> I have found some old MB code that seems to do a similar thing to
> what I want.It creates an object in VB based on the Mapinfo object
> (MI) already created using Set mbObj =
> Mi.MBApplications(1).MBGlobalsVB then seems to be able to influence
> global variables created in the MBX What I need to know is:1. What is
> this actually doing (above) ??2. How does the MBX stay open i.e. does
> the fact that there is an object declared for it keep it in memory.I
> tried creating an MBX with global variables but after I've issued the
> Run Application Command, the variables didn't seem to be available to
> my VB calls. Is it because the MBX has "finished" ?? Yours
> frustratedly,Scott....
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]