阅读:1391回复:2
求助:在mapx中如何实现自动滚屏
<P>我想实现</P>
<P>在mapx中如何实现自动滚屏!如何????有个例子只是简单的鼠标移动到边界滚屏!</P> <P>请问能否实现像mapinfo7.0那样的,有个功能叫:“打开自动滚屏”和“关闭自动滚屏”</P> <P>这样可以实现例如:矩形选择、圆形选择、距离测量可以将点延伸到边界外面滚屏!!!</P> <P>谢谢</P> <P>是否有例子让我参考下。我用的是vc6.0+mapx5.0</P> <P>我的邮箱是:ypyang@longtop.com</P> |
|
1楼#
发布于:2004-10-10 09:44
<P><FONT color=#ff0033>按照下面的例子并不能实现鼠标画的线随地图的漫游而漫游!!</FONT></P><P><FONT color=#ff0033>而是在屏幕坐标上不变!!!!!!!!!!!!!!!!!</FONT></P><P><FONT size=1>在mapx中如何实现自动滚屏</FONT></P><P><FONT size=1>mapx 支持 MouseMove 事件,可以在此事件中实现自动滚屏,示例如下:</FONT></P><P><FONT size=1>Private Sub Map1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)</FONT></P><P><FONT size=1>If map_move = True Then</FONT></P><P><FONT size=1>If X > Map1.MapScreenWidth - 10 Then</FONT></P><P><FONT size=1>Map1.CenterX = Map1.CenterX + 0.05</FONT></P><P><FONT size=1>Map1.Refresh</FONT></P><P><FONT size=1>Else</FONT></P><P><FONT size=1> If X < 10 Then</FONT></P><P><FONT size=1> Map1.CenterX = Map1.CenterX - 0.05</FONT></P><P><FONT size=1> Map1.Refresh</FONT></P><P><FONT size=1> Else</FONT></P><P><FONT size=1> If Y > Map1.MapScreenHeight - 10 Then</FONT></P><P><FONT size=1> Map1.CenterY = Map1.CenterY - 0.05</FONT></P><P><FONT size=1> Map1.Refresh</FONT></P><P><FONT size=1> Else</FONT></P><P><FONT size=1> If Y < 10 Then</FONT></P><P><FONT size=1> Map1.CenterY = Map1.CenterY + 0.05</FONT></P><P><FONT size=1> Map1.Refresh</FONT></P><P><FONT size=1> End If</FONT></P><P><FONT size=1> End If</FONT></P><P><FONT size=1> End If</FONT></P><P><FONT size=1>End If</FONT></P><P><FONT size=1>End If</FONT></P><P><FONT size=1>End Sub</FONT></P>
|
|
2楼#
发布于:2004-11-11 10:43
<P>为什么这里提问都没有人理呢??</P><P>斑竹也不出来看看。有经验的人应该多多传授,</P><P>不然小的们怎么进步啊?????</P>
|
|