Decription: Like older versions of Draw. Zooming with zoom tool would revert to previous tool after zooming.
Date: 2011-01-21 Author: John
Code:
Option Explicit
Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Sub quickZoom()
Dim t As Integer
Dim sngStartTime As Single
sngStartTime = Timer
t = ActiveTool
If ActiveTool <> cdrToolZoom Then
ActiveTool = cdrToolZoom
End If
Do While GetAsyncKeyState(vbKeyEscape) = 0 And (Timer - sngStartTime) < 3
DoEvents
Loop
If t = cdrToolZoom Then
ActiveTool = cdrToolPick
Else
ActiveTool = t
End If
End Sub
|