阅读:2186回复:1
定制Pan/Zoom工具条2---Pan and Rotate
<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> |
|
|
1楼#
发布于:2008-06-21 00:27
<P>虽然简单,却是很典型的用法。不错不错。</P>
|
|