Hi,

I've just started integrating MapInfo with VB6.  I would like to display a line
or a square on my workspace when I open a MapInfo map from VB.  So far I've
managed to open MapInfo and display a map as a workspace.  This is the code that
I have so far, so please email me some suggestions on how to solve this problem.

Private Sub mnuExample_Click()
Dim mi As Object
Dim j As Integer
Dim i As Integer
On Error Resume Next
MapWindow.Visible = True
Set mi = GetObject(, "MapInfo.Application")
mi.Parent.Visible = True

If mi Is Nothing Then
    Set mi = CreateObject("MapInfo.Application")
    mi.Do "close all"
    mi.Do "set next Document Parent " & MapWindow.hWnd & " Style 1"
    mi.Do "set application window " & hWnd
    mi.Do "set window message parent " & hWnd
    mi.Do "print "" This is a  message  """
    mi.Do "run application ""c:\unzipped\HPSD\temp.WOR"" "
    mi.Visible = True

'This is where I dont know how to display a line
    'mi.Do "Set Style Pen MakePen(1,60," & j & ")"
    'mi.Do "update cell set obj=createline(x1,y1,cell.lon,cell.lat) where
rowid=" & i


    If mi Is Nothing Then
        MsgBox "Could not start MapInfo.Application will quit"
        Set mi = Nothing
        End
    End If
End If
mi.Quit
Set mi = Nothing


Regards
  Maya




NOTICE - This message contains privileged and confidential information
intended only for the use of the addressee named above.  If you are not
the intended recipient of this message you are hereby notified that you
must not disseminate, copy or take any action in reliance on it. If you
have received this message in error please notify DMR Consulting
Group immediately.

Any views expressed in this message are those of the individual sender,
except where the sender specifically states them to be the views of DMR
Consulting Group.


----------------------------------------------------------------------
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