InertiaM
Well-known member
Is there a simple way to convert mouse coordinates based on the current Scale and Transform values? For example, if I do :-
how do I then use the transform matrix to calculate the mouse coordinates from

VB.NET:
Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
With e.Graphics
.ScaleTransform(0.45, 0.45)
.TranslateTransform(-750, -750)
'store the transform matrix here
End with
End Sub
how do I then use the transform matrix to calculate the mouse coordinates from
VB.NET:
Private MouseLocation As Point
Private Sub frmMain_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove
MouseLocation = e.Location
'apply the transform matrix to the mouse location here
End Sub