Ok, so I'm getting an error that says "'New' cannot be used on an interface" with the following code:
The weird part is that I have used this code with other programs and it works fine. I literally copied and pasted it from another program I wrote. Does anyone have any ideas as to why I would get this error ('New' cannot be used on an interface) on one program but not another? Any suggestions, ideas, thoughts, etc. are much appreciated. Thanks!
Code:
Private Sub Form1_MouseDown(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown
clicked = True
mousePoint = New Point(e.X, e.Y)
End Sub
Private Sub Form1_MouseMove(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove
If clicked Then
Me.Location = New Point(Cursor.Position.X - mousePoint.X, Cursor.Position.Y - mousePoint.Y)
End If
End Sub
Private Sub Form1_MouseUp(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseUp
clicked = False
End Sub