MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Work with mapinfo by VB6, help me!!!

This is a discussion on Work with mapinfo by VB6, help me!!! within the Other Mapping Platforms forums, part of the Map Forums category; I want import a map of mapinfo to VB6, i don't make it, every body help me. func "callback" do ...


Go Back   MapPoint Forums > Map Forums > Other Mapping Platforms

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-01-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Work with mapinfo by VB6, help me!!!

I want import a map of mapinfo to VB6, i don't make it, every body help me. func "callback" do not operate in VB6. thank!!!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 03-01-2004
Eric Frost's Avatar
Senior Member
Black Belt
 
Join Date: Jul 1992
Posts: 2,465
Blog Entries: 1
Try posting in the MapInfo forum: http://www.mapinfo-l.com

Thanks,
Eric
__________________
~ Now taking orders for MapPoint 2009 ~
~
~ Upgrade to MapForums Plus membership ~
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 02-16-2007
Junior Member
White Belt
 
Join Date: Feb 2007
Posts: 2
Re: Work with mapinfo by VB6, help me!!!

hi
this is a way to load a mapinfo table within a vb6 form.
create a vb6 project.

on the form place a picturebox, a commandbutton and a commondialog

// this code goes into module level//
Public itsamap As Boolean
Public mapWinID As Long
Public mapinfo As Object

public Sub OpenATable()
Dim file_name As String
Dim tabName As String
On Error GoTo userCancelled
form1.CommonDialog1.Filter = "MapInfo Tables (*.tab)|*.tab"
form1.CommonDialog1.FilterIndex = 1
form1.CommonDialog1.ShowOpen
file_name = form1.CommonDialog1.FileName
tabName = mapinfo.Eval("PathToTableName$( """ & file_name & """ )")
mapinfo.Do "Open Table """ & file_name & """ as " & tabName
mapinfo.Do "Set Table " & tabName & " ReadOnly"
If mapinfo.Eval("TableInfo(" & tabName & "," & 5 & ")") = "F" Then
MsgBox "Cannot open table!"
mapinfo.Do "Close Table " & tabName
Exit Sub
End If
If itsamap Then
mapinfo.Do "Add Map Layer " & tabName
Else
mapinfo.Do "Set Next Document Parent " & form1.picture1.hWnd & " Style 1"
mapinfo.Do "Map From " & tabName
mapWinID = CLng(mapinfo.Eval("FrontWindow()"))
itsamap = True
End If
Exit Sub
userCancelled:
Exit Sub
End Sub
-----------------------------------------------------------------------
// this code goes into form level//
Private Sub Form_Load()
Set mapinfo = CreateObject("MapInfo.Application")
mapinfo.Do "Set Application Window " & form1.hWnd
End Sub

Private Sub Command1_Click()
Call OpenATable
End Sub
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 02-16-2007
Eric Frost's Avatar
Senior Member
Black Belt
 
Join Date: Jul 1992
Posts: 2,465
Blog Entries: 1
Re: Work with mapinfo by VB6, help me!!!

Cool thanks for posting the code.

That will just post the image, right?

Next time, please surround your code with the code tags, it is the pound symbol. That way it will be properly posted into the forum with indentation. Try it and let me know what you think, you should be able to edit your earlier post.

Eric
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 02-20-2007
Junior Member
White Belt
 
Join Date: Feb 2007
Posts: 2
Re: Work with mapinfo by VB6, help me!!!

dear eric
actually, the code i submitted for implementing a map within vb does not only display the map as image.
there are some useful constants we can use to execute commands as if we are in mapinfo.
here are some if you want to try.

put the following code in a module:

Global Const M_TOOLS_SELECTOR = 1701
Global Const M_TOOLS_SEARCH_RECT = 1722
Global Const M_TOOLS_SEARCH_RADIUS = 1703
Global Const M_TOOLS_SEARCH_BOUNDARY = 1704
Global Const M_TOOLS_EXPAND = 1705
Global Const M_TOOLS_SHRINK = 1706
Global Const M_TOOLS_RECENTER = 1702
Global Const M_TOOLS_PNT_QUERY = 1707
Global Const M_TOOLS_LABELER = 1708
Global Const M_TOOLS_DRAGWINDOW = 1734
Global Const M_TOOLS_RULER = 1710
Global Const M_TOOLS_INFO = 1790

call them by using the following:
ex:

mapinfo.RunMenuCommand 1708

this will allow you for instance to display the label.

i can e.mail you the entire constants list if you want.

Last edited by marmi; 02-20-2007 at 10:03 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 07-30-2008
Junior Member
White Belt
 
Join Date: Jul 2008
Posts: 1
Work with mapinfo by VB6, help me!!!

How to add a symbol, edit a map (tab file) in vb6 code?
Thanks!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7 (permalink)  
Old 08-07-2008
Junior Member
White Belt
 
Join Date: Aug 2008
Posts: 1
Re: Work with mapinfo by VB6, help me!!!

hi...
can any one give me source code how to open file workspace mapinfo at vb?? i change *.tab with *.wor and not working... help.... please..
:h elpsmilie:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
mapinfo, vb6, work


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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Plotting MapInfo data in MapPoint cableghost MapPoint 2006/2009 Discussion 2 06-09-2005 04:08 PM
Unable to add Mapinfo files to MapPoint via Com Add-In Acgmapping MapPoint 2006/2009 Discussion 2 01-27-2005 11:39 AM
ESRI and MapInfo Maps Anonymous MapPoint 2006/2009 Discussion 1 04-28-2004 10:44 AM
Map-In-A-Box Puts MapPoint Maps Into MapInfo Eric Frost MP2K Magazine Articles 0 10-02-2002 12:08 PM
MapPoint and MapInfo JANOS MapPoint 2006/2009 Discussion 3 08-16-2002 06:39 PM


All times are GMT -5. The time now is 08:47 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54