POINT Home
POINT

This content has moved to another location. See POINT for the latest version.

Community Content

VB9: Possible implementation of the POINTAPI structure
Added by:Đonny
       ''' <summary>The POINT structure defines the x- and y- coordinates of a point.</summary>
<StructLayout(LayoutKind.Sequential)> _
Friend Structure POINTAPI
''' <summary>Specifies the x-coordinate of the point.</summary>
Public x As Int32
''' <summary>Specifies the y-coordinate of the point.</summary>
Public y As Int32
''' <summary>CTor</summary>
''' <param name="x">the x-coordinate of the point</param>
''' <param name="y">the y-coordinate of the point.</param>
Public Sub New(ByVal x As Integer, ByVal y As Integer)
Me.x = x
Me.y = y
End Sub
''' <summary>Converts <see cref="POINTAPI"/> to <see cref="Point"/></summary>
''' <param name="a">A <see cref="POINTAPI"/></param>
''' <returns>A <see cref="Point"/></returns>
Public Shared Widening Operator CType(ByVal a As POINTAPI) As Point
Return New Point(a.x, a.y)
End Operator
''' <summary>Converts <see cref="Point"/> to <see cref="POINTAPI"/></summary>
''' <param name="a">A <see cref="Point"/></param>
''' <returns>A <see cref="POINTAPI"/></returns>
Public Shared Widening Operator CType(ByVal a As Point) As POINTAPI
Return New POINTAPI(a.X, a.Y)
End Operator
End Structure
© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View