//定义被查找的表
Column _searchColumn;
//定义被查找的列,必须是被索引的
FindResult _result;
//定义查询结果
Find find = null;
//定义查找对象,并实例化为null
_searchTable = Session.Current.Catalog.OpenTable(@"C:\Program Files\MapInfo\MapXtreme\6.0\Samples\Data\worldcap.TAB");
//打开被查找的表
Columns columns = _searchTable.TableInfo.Columns;
//定义出表的列
_searchColumn = columns["Capital"];
//注意此处的Capital是要区分大小写的。指定查找的列
find = new Find(_searchTable,_searchColumn);
//实例化查找对象
find.UseCloseMatches = true;
//指定如果找不到完全匹配是否返回 "N" 个接近的匹配。
find.CloseMatchesMax = 6;
//即上面的 "N"
FindResult _findResult = find.Search(textBox2.Text.ToString());
//给出所要查找的目标,返回查找的结果
MapInfo.Geometry.DPoint dpoint;
dpoint.x = (double)_findResult.FoundPoint.X;
dpoint.y = (double)_findResult.FoundPoint.Y;
mapControl1.Map.Center = dpoint;
find.Dispose();
//释放find对象