swatlw
路人甲
路人甲
  • 注册日期2004-09-17
  • 发帖数14
  • QQ
  • 铜币164枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1935回复:5

[求助]vb.net图例的使用

楼主#
更多 发布于:2004-10-19 19:58
<P>在vb.net中,使用图例出现如下错误提示:</P>
<P>运行错误“450” ,错误的参数和无效属性分配</P>
<P>怎么回事啊,在 VB中运行正常的</P>
喜欢0 评分0
gis
gis
管理员
管理员
  • 注册日期2003-07-16
  • 发帖数15951
  • QQ
  • 铜币25345枚
  • 威望15368点
  • 贡献值0点
  • 银元0个
  • GIS帝国居民
  • 帝国沙发管家
  • GIS帝国明星
  • GIS帝国铁杆
1楼#
发布于:2004-10-20 09:53
<P>引用正确吗?</P>
GIS麦田守望者,期待与您交流。
举报 回复(0) 喜欢(0)     评分
swatlw
路人甲
路人甲
  • 注册日期2004-09-17
  • 发帖数14
  • QQ
  • 铜币164枚
  • 威望0点
  • 贡献值0点
  • 银元0个
2楼#
发布于:2004-10-20 10:40
<P>大家分析一下源代码,问题在哪儿</P><P><FONT size=1>Private Sub Form1_Load(ByVal sender As Object, ByVal e As _ System.EventArgs) Handles MyBase.Load
        Axlegend1.setMapSource(AxMap1</FONT>) </P><P><FONT size=1>end sub</FONT></P><P><FONT size=1>AxMap1是地图控件名</FONT></P><P><FONT size=1>Axlegend1是图例控件名</FONT></P><P><FONT size=1>Private Sub Axlegend1_AfterSetLayerVisible(ByVal sender As Object, ByVal e As AxMO21legend.__legend_AfterSetLayerVisibleEvent) Handles _Axlegend1.AfterSetLayerVisible
        AxMap1.Refresh()
 End Sub</FONT></P><P><FONT size=1>最后在图层调用中加入</FONT></P><P> <FONT size=1>Axlegend1.LoadLegend(True)</FONT></P><P><FONT size=1>=========</FONT></P>
举报 回复(0) 喜欢(0)     评分
xyq
xyq
路人甲
路人甲
  • 注册日期2004-06-20
  • 发帖数6
  • QQ
  • 铜币111枚
  • 威望0点
  • 贡献值0点
  • 银元0个
3楼#
发布于:2004-11-17 20:55
<P>在vb.net里面开发的效率好像不及vb的效率</P><P>我碰到这样一个问题</P><P>在vb.net里面的fields 为什么不是集合呢(在vb里面是),比如不能这样用:</P><P>dim fld as mapobjects2.field</P><P>dim recs as mapobjects2.recordsets</P><P>dim lyr as mapobjects.maplayer</P><P>dim inti as int16</P><P>for inti=0 to axmap1.layers.count-1</P><P>     for each fld in lyr.records.fields</P><P>       .........</P><P>       ........</P><P>  next</P><P>next</P><P>其中for each fld in lyr.records.fields就会出问题,提示不是集合,我就感到奇怪,它明明是集合呀?为什么不能用呢,而且在vb里面可是能够用的阿??求助阿,把我弊死了阿</P>
举报 回复(0) 喜欢(0)     评分
xyq
xyq
路人甲
路人甲
  • 注册日期2004-06-20
  • 发帖数6
  • QQ
  • 铜币111枚
  • 威望0点
  • 贡献值0点
  • 银元0个
4楼#
发布于:2004-11-17 20:56
axmap1.refresh在vb.net 里面应该为axmap1.ctlrefresh!
举报 回复(0) 喜欢(0)     评分
liugengshen
路人甲
路人甲
  • 注册日期2006-03-28
  • 发帖数33
  • QQ
  • 铜币185枚
  • 威望0点
  • 贡献值0点
  • 银元0个
5楼#
发布于:2006-07-29 15:21
        frmMain.Axlegend.setMapSource(frmMain.AxMap1.GetOcx)<BR>        frmMain.Axlegend.LoadLegend(True)
举报 回复(0) 喜欢(0)     评分
游客

返回顶部