Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Support Forum
Download Visual Studio Add-In

Terms of Use
Privacy Policy
POINT (Structures)
 
.
Summary
The POINT structure defines the x- and y-coordinates of a point.

C# Signature:

    [StructLayout(LayoutKind.Sequential)]
    public struct POINT
    {
        public int X;
        public int Y;

        public POINT(int x, int y)
        {
            this.X = x;
            this.Y = y;
        }

        public POINT(System.Drawing.Point pt) : this(pt.X, pt.Y) { }

        public static implicit operator System.Drawing.Point(POINT p)
        {
            return new System.Drawing.Point(p.X, p.Y);
        }

        public static implicit operator POINT(System.Drawing.Point p)
        {
            return new POINT(p.X, p.Y);
        }
    }

VB .NET Signature:

    <System.Runtime.InteropServices.StructLayout(Runtime.InteropServices.LayoutKind.Sequential)> _
    Public Structure POINT
    Public X As Integer
    Public Y As Integer

    Public Sub New(ByVal X As Integer, ByVal Y As Integer)
        Me.X = X
        Me.Y = Y
    End Sub
    End Structure

VB Signature

Public Type POINT
    X As Long
    Y As Long
End Type

User-Defined Types:

None.

Notes:

System.Drawing.Point can be used instead. Even better because you don't have to convert between the 2 structs. It's a standard struct in .NET.

Useful constants:

  public const int PM_NOREMOVE = 0x0000;
  public const int PM_REMOVE = 0x0001;
  public const int PM_NOYIELD = 0x0002;

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Alternative Managed API:

System.Drawing.Point

Documentation
POINT on MSDN

Please edit this page!

Do you have...

  • helpful tips?
  • corrections to the existing content?
  • alternate definitions?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing any supporting types needed.

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions