@msdn=http://search.microsoft.com/search/results.aspx?qu=$$$ @pinvoke=http://pinvoke.net/$$$.htm Summary: The CreatePolygonRgn API !!!!C# Signature: [DllImport("gdi32.dll")] static extern IntPtr CreatePolygonRgn(POINT [] lppt, int cPoints, int fnPolyFillMode); !!!!User-Defined Types: [POINT] !!!!Notes: Values for fnPolyFillMode can be 1=Alternate or 2=Winding !!!!Tips & Tricks: System.Drawing.Point can be used instead POINT. [DllImport("gdi32.dll")] static extern IntPtr CreatePolygonRgn(Point[] lppt, int cPoints, int fnPolyFillMode); !!!!Sample Code: /// <summary> /// Create a border for custom label control /// </summary> /// <returns> /// if int is returned. Function was successful. /// if string is returned. Function was failed. /// </returns> /// <remarks>Created by Jim Vazquez Castan. jim.vazquez@gmail.com</remarks> private string SetBorder() { try { // First we create polygon IntPtr forma = CreatePolygonRgn(edges, edges.Length, 1); // then we create area int iRes = SetWindowRgn(this.Handle, forma, true); return iRes.ToString(); } catch (Exception ex) { return ex.Message; } } !!!!Alternative Managed API: Do you know one? Please contribute it! Documentation: CreatePolygonRgn@msdn on MSDN
Edit gdi32.CreatePolyg...
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.