I'm using https://www.devhut.net/vba-wia-rotate-an-image/ to rotate a Pictures on my Form with this code
The problem is DoCmd.CancelEvent Should this prevent the right click menu appearing, as it isn't ?
Code:
Private Sub Detail_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim tempPic As String
Dim DegreeShift As Long
DoCmd.CancelEvent
DegreeShift = IIf(Button = LEFT_BUTTON, 270, 90)
tempPic = CurrentProject.Path & "\tp\"
If FolderExists(tempPic) = False Then
'make a temp folder which is deleted in the Form close event
MkDir (tempPic)
End If
'Build temporary filename
tempPic = tempPic & CLng(Now) & NumbersOnly(Format(Now, "hh:mm:ss")) & GetExt(Me.Picture)
DegreeShift = IIf(Button = LEFT_BUTTON, 270, 90)
Call WIA_RotateImage(Me.Picture, tempPic, DegreeShift)
Me.Picture = tempPic
End Sub