Andrew,
I currently use this type of approach in one of my applications:-

Private Sub FindAcquisition_Click()
mapinfo.do "Set window " & winnumMAP & "front"
mapinfo.do "Set Map Zoom 0.25 Units ""km"" "
mapinfo.do "alter MapInfoDialog 2202 control 4 hide"
mapinfo.do "alter MapInfoDialog 2202 control 3 hide"
mapinfo.do "alter MapInfoDialog 2202 control 12 hide"
mapinfo.do "alter MapInfoDialog 2202 control 11 hide"
mapinfo.do "alter MapInfoDialog 2202 control 5 Value ""1"""
mapinfo.do "create index on ACQUISITIONS(REFNumber)"
mapinfo.do "Find using ACQUISITIONS(RefNumber)"
mapinfo.do "run menu command 305"
End Sub

Try some of these settings :-
1: Make sure your map window has focus
2: Maybe specify the table to do the search on (Find Using)
3: Use a create index command on the table to use (if an index exists this
command will be skipped)

In addition if you want to make the dialog look more like your own, use the
Alter MapInfoDialog commands and remove certain features eg Respecify

The Run Menu Command should work quite happily with this but if problems
persist:-
1: Check in Task Manager (if you run NT) under processes that you still have
MI running
2: In MI show MapBasic window and type in "run Menu Command 305"
        This approach can act as a debugger for Integrated Mapping Apps,
because through OLE automation you can run any commands 
        that can be run through this MB window, if it will not run in the MB
window it will not run as a "Mapinfo.do" in VB.

I hope this helps

Tim Chinchen (GIS Department - IT Services)
Bournemouth Borough Council
mailto:[EMAIL PROTECTED]



> -----Original Message-----
> From: Andrew Bailey [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, March 10, 1999 12:01 PM
> To:   [EMAIL PROTECTED]
> Subject:      Q. MI & VB5: using the Query->Find MI dialog
> 
> Hi there,
> i'm just starting out combiing VB with MI, and having a right laugh as you
> can imagine - its actually not that bad so far, but i've come stuck so i
> thought i'd probe your collective minds. I've had success in using the
> mapinfo.RunMenuCommand (number) for stuff like the toolbar zooms, pans and
> info buttons etc. All well and good, but i've tried to activate the
> Query->Find dialog, which is RunMenuCommand 305. It just doesn't want to
> work, any ideas?
> 
> I'm using OLE interaction and have the basic definition of mapinfo using
> CreateObject("Mapinfo.Application")
> 
> 
> Andrew Bailey
> GIS Officer
> Estate Management and Development
> Strategy and Commissioning
> Christopher Addison House
> 72 Wilton Way
> London E8 1BJ
> Tel: 0181 356 2227
> Home email: [EMAIL PROTECTED]
> The views expressed are not necessairly the views of LBH.
> ----------------------------------------------------------------------
> 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