本文整理汇总了VB.NET中System.Drawing.Size.Equality操作符的典型用法代码示例。如果您正苦于以下问题:VB.NET Size.Equality操作符的具体用法?VB.NET Size.Equality怎么用?VB.NET Size.Equality使用的例子?那么恭喜您, 这里精选的操作符代码示例或许可以为您提供帮助。
在下文中一共展示了Size.Equality操作符的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: CreatePointsAndSizes
Private Sub CreatePointsAndSizes(ByVal e As PaintEventArgs)
' Create the starting point.
Dim startPoint As New Point(subtractButton.Size)
' Use the addition operator to get the end point.
Dim endPoint As Point = Point.op_Addition(startPoint, _
New Size(140, 150))
' Draw a line between the points.
e.Graphics.DrawLine(SystemPens.Highlight, startPoint, endPoint)
' Convert the starting point to a size and compare it to the
' subtractButton size.
Dim buttonSize As Size = Point.op_Explicit(startPoint)
If (Size.op_Equality(buttonSize, subtractButton.Size)) Then
' If the sizes are equal, tell the user.
e.Graphics.DrawString("The sizes are equal.", _
New Font(Me.Font, FontStyle.Italic), _
Brushes.Indigo, 10.0F, 65.0F)
End If
End Sub