MapControl に対してマウス ホイールの回転方向を制御

 2016/9/1 (木)    

'MapControlは拡大・縮小の回転方向が制御できないのでOnMouseWheelで制御
Protected Overrides Sub OnMouseWheel(ByVal e As System.Windows.Forms.MouseEventA
 
    If e.Delta > 0 Then
        '拡大
        axMapControl1.MapScale = axMapControl1.MapScale - 10000
    Else
        '縮小
        axMapControl1.MapScale = axMapControl1.MapScale + 10000
    End If
 
    axMapControl1.Refresh()
 
End Sub

Copyright© WINGFIELD since1981 , 2018 All Rights Reserved.