Paul,

try to use the Automation.

If MapInfo is properly installed this will work:

dim mapinfo as object
set mapinfo = CreateObject("Mapinfo.Application")
mapinfo.Visible = True


Look at the MapInfo documentation for integrated mapping for more.

Or ask the registry for the install-path for mapinfo.

Regards


Markus

----- Original Message -----
From: Paul Fildes <[EMAIL PROTECTED]>
To: MapInfo List <[EMAIL PROTECTED]>
Sent: Monday, June 05, 2000 11:50 AM
Subject: MI: Invoking MapInfo Pro from VB application


> Dear all,
>
> >From my VB application I'd like to launch MapInfo Professional via a menu
> item, and/or a toolbar. The problem I have is that my application when
> running isn't going to know where MapInfo has been installed on the
machine,
> if at all. Can anybody please tell me how I can determine whether MapInfo
> Pro. has been installed on a machine, and if so, how to launch it?.
>
> I've already tried the following code, which apparently works for
launching
> "Excel", but it didn't work for MapInfo;
>
> Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
>     (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As
> String, _
>      ByVal lpParameters As String, ByVal lpDirectory As String, _
>      ByVal nShowCmd As Long) As Long
>
> Private Sub cmdLaunchMapInfo_Click()
>
>    Dim ReturnedStatus As Long
>
> 'Launch MapInfo
>    ReturnedStatus = ShellExecute(Me.hwnd, vbNull, "Mapinfo", vbNull,
vbNull,
> 1)
> End Sub
>
> Thanks,
>
> Paul Fildes                                   Phone: +44 121 643 6711
> Technology Applications Group, Maunsell Ltd,  Fax:   +44 121 643 1357
> Attwood House, 1 Worcester Walk,              Email: [EMAIL PROTECTED]
> New Street, Birmingham B2 4NX, UK             URL:   www.maunsell.co.uk
> ----------------------------------------------------------------------
> To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
> "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
>

----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to