Hello Aine,
1) You need to use GetObject [ole] which will connect to a currently running
application - MI
CreateObject will create a *new* instance of the app.
2) A little know trick [well over one app is over 10,000 lines of Delphi
plus many other apps]
TELL MI TO COPY TO THE CLIPBOARD --
MIMap.RunMenuCommand(M_EDIT_COPY)
Defined as ID 203
This will *paste* the current record data [tab delimited] and the
graphic [object] to the text and graphic
areas of the clipboard
The use the PasteFromClipBoard procedure of VB [or WinAPI] to put
data into a string or edit box
You can then parse out each field which is *much* quicker than all
the EVAL calls
Also you can dynamically create a scroll box with the correct number
[field count from MI] edit boxes and labels
I haven' t done an VB in about 3 years but it's all there
Hope this helps...............check the website for a VB example of calling
MI plus WinAPI and other goodies
Trey Pattillo
[EMAIL PROTECTED]
http://www.wap3.com
----- Original Message -----
From: Aine Deery <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, 22 May, 2000 08:40
Subject: MI Creating a MapInfo Editor in VB
> Hi there,
>
> I am attempting to create an editor in VB to view/edit point data from
> MapInfo. I want this editor to be an add-on to my core MapInfo application
> as oppose to an integrated mapping solution. Any ideas? I would like to
use
> VB as I require some dialog controls that are not available in MapBasic. I
> have a few questions that I would appreciate help on:
>
> 1. As part of the editor I wish to display the attribute information of
the
> currently selected row of the MapInfo .tab file (similar to the info tool)
> what is the most efficient way to access this data from VB. As my first
> attempt I havethe following (where TSG holds the tablename) This works but
I
> am wondering is there a better approach than calling Eval for each
> individual attribute.
> FrmSignEditor.Text1.Text = mi.Eval(TSG + ".SignGroupID")
> FrmSignEditor.Text2.Text = mi.Eval(TSG + ".NoOfPosts")
> FrmSignEditor.Text3.Text = mi.Eval(TSG + ".PostHeight")
> FrmSignEditor.Text4.Text = mi.Eval(TSG + ".PostType")
> FrmSignEditor.Text6.Text = mi.Eval(TSG + ".Terrain")
> FrmSignEditor.Text7.Text = mi.Eval(TSG + ".Comment")
>
> 2. Any ideas on where I can locate some good VB/MapInfo Resources.
>
> I am currently running VB5 and MapInfo Prof.5 and MapBasic5. Any help is
> greatly appreciated.
>
> thank -you,
>
> Aine Deery
>
> ----------------------------------------------------------------------
> 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]