Mega Code Archive

 
Categories / VB.Net Tutorial / 2D Graphics
 

Add first point and size to another point

Imports System.Drawing Imports System.Drawing.Drawing2D Imports System.Windows.Forms public class MainClass    public Shared Sub Main         Dim sz As New Size(12, 12)         ' Create a Point         Dim pt As New Point(20, 20)         ' Add poitn and size and copy to point         pt.X += sz.Width         pt.Y += sz.Height         Console.WriteLine("Addition :" + pt.ToString())    End Sub End class Addition :{X=32,Y=32}