After i tried to optimize my code with option Strict ON i get many errors at least one is left.
i've created the Variable MoveForm_MousePosition as Point = System.drawing.point
Imports System.Drawing
Public MoveForm_MousePosition As Point
Private Sub lblYaple_MouseDown(sender As Object, e As MouseEventArgs) Handles lblYaple.MouseDown
If e.Button = MouseButtons.Left Then
MoveForm = True
Me.Cursor = Cursors.NoMove2D
MoveForm_MousePosition = e.Location
End If
End Sub
Public Sub lblYaple_MouseMove(sender As Object, e As MouseEventArgs) Handles lblYaple.MouseMove
If MoveForm Then Me.Location = Me.Location + (e.Location - MoveForm_MousePosition)
End Sub
In this Line
If MoveForm Then Me.Location = Me.Location + (e.Location - MoveForm_MousePosition)
Option Strict On disallows implicit conversions from 'System.Drawing.Point' to 'System.Drawing.Size'
can't understand, me.location and e.location and MoveForm_MousePostions should be System.Drawing.Point why comes this error up?