Необходимо передать параметры в mbx программу. Делал по примеру: тут
Код: Выделить всё
Include "MAPBASIC.DEF"
Include "MENU.DEF"
Declare Sub RemoteMsgHandler
Declare Sub Main
Sub Main
' We don't need to doing anything here.
End Sub
Sub RemoteMsgHandler
Dim command as String
'Call commandinfo to get the string that was sent to us.
command = CommandInfo(CMD_INFO_MSG)
Note command
End Sub
Код: Выделить всё
Type mapinfotype = Type.GetTypeFromProgID("Mapinfo.Application");
DMapInfo mapinfoinstance = (DMapInfo)Activator.CreateInstance(mapinfotype);
mapinfoinstance.Visible = true;
string appcommand = "Run Application " + "\"" + @"D:\trymi.MBX" + "\"";
mapinfoinstance.Do(appcommand);
DMBApplications MBApps = (DMBApplications)mapinfoinstance.MBApplications;
foreach (DMapBasicApplication app in MBApps)
{
if (app.Name == "trymi.MBX")
{
myapp = app;
break;
}
}
Уже всю голову сломал, не знаю что не так.
MapInfo 7.8, MS Visual Studio Express 2010