kisssy
卧底
卧底
  • 注册日期2004-04-18
  • 发帖数235
  • QQ
  • 铜币614枚
  • 威望2点
  • 贡献值0点
  • 银元0个
阅读:2186回复:1

定制Pan/Zoom工具条2---Pan and Rotate

楼主#
更多 发布于:2004-04-28 09:22
<P>Pan and Rotate 功能很简单:就是移动和旋转;它们的实现过程也是相当简单</P>
<P>新建两个UItoolcontrol:一个叫Pan,一个叫Rotate</P>
<P>Private Sub pan_MouseDown(ByVal button As Long, ByVal shift As Long, ByVal x As Long, ByVal y As Long)
Dim mxdoc As IMxDocument
Dim pa As IActiveView
Dim pdis As IScreenDisplay
Set mxdoc = Application.Document
Set pa = mxdoc.FocusMap
Set pdis = pa.ScreenDisplay
pdis.TrackPan
End Sub</P>
<P>Private Sub rotate_MouseDown(ByVal button As Long, ByVal shift As Long, ByVal x As Long, ByVal y As Long)
Dim mxdoc As IMxDocument
Dim pa As IActiveView
Dim pdis As IScreenDisplay
Set mxdoc = Application.Document
Set pa = mxdoc.FocusMap
Set pdis = pa.ScreenDisplay
pdis.TrackRotate</P>
<P>End Sub</P>
<P>如果大家要改变Select它们后的光标,请在下面的事件中更改:</P>
<P>Private Function rotate_CursorID() As Variant</P>
<P><FONT color=#ff0000> rotate_CursorID=   ' 请在此输入(0-10),每个值对应一种光标,例如3是十字光标</FONT></P>
<P>End Function</P>
喜欢0 评分0
个人专栏: https://zhuanlan.zhihu.com/c_165676639
hahahan
路人甲
路人甲
  • 注册日期2007-08-05
  • 发帖数60
  • QQ
  • 铜币251枚
  • 威望0点
  • 贡献值0点
  • 银元0个
1楼#
发布于:2008-06-21 00:27
<P>虽然简单,却是很典型的用法。不错不错。</P>
举报 回复(0) 喜欢(0)     评分
游客

返回顶部