Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27333

Strict disallows implicit conversions from Drawing.Point' to 'Drawing.Size

$
0
0
Trying to get a grasp on skinning. Works fine with strict off how ever i do understand the implicit conversion but can't for the life of me solve it.

vb Code:
  1. Private mPoint As New Point(0, 0)
  2.     Private mHeight As Integer = 50
  3.  
  4.     Protected Overrides Sub OnMouseMove(ByVal e As MouseEventArgs)
  5.         MyBase.OnMouseMove(e)
  6.            Parent.Location = mPosition - mPoint
  7.     End Sub

Error 1 Overload resolution failed because no accessible '-' can be called with these arguments:
'Public Shared Operator -(pt As System.Drawing.Point, sz As System.Drawing.Size) As System.Drawing.Point': Option Strict On disallows implicit conversions from 'System.Drawing.Point' to 'System.Drawing.Size'

Viewing all articles
Browse latest Browse all 27333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>