How to create an algorithm that can determine if a point is contained in an irregular polygon defined by the points of its corners
ray casting algorithm
https://en.wikipedia.org/wiki/Ray_casting
https://www.researchgate.net/figure/Illustration-of-the-Ray-Casting-Algorithm_fig5_259468883
https://gistbok.ucgis.org/bok-topics/geometric-primitives-and-algorithms
Computational Geometry Algorithms and Applications
https://www.geeksforgeeks.org/geometric-algorithms/
https://www.geeksforgeeks.org/c-program-find-area-triangle/
https://demonstrations.wolfram.com/AnEfficientTestForAPointToBeInAConvexPolygon/
https://www.sciencedirect.com/science/article/pii/S0925772115000759
https://www.geeksforgeeks.org/how-to-check-if-a-given-point-lies-inside-a-polygon/
ray casting algorithm Geometric algorithms region pointer Whether the coordinates are within the shape area
https://www.scribd.com/document/56214673/Ray-Casting-Algorithm
https://rosettacode.org/wiki/Ray-casting_algorithm
https://stackoverflow.com/questions/217578/how-can-i-determine-whether-a-2d-point-is-within-a-polygon
https://octave.sourceforge.io/geometry/function/clipPolygon_clipper.html
https://www.researchgate.net/figure/An-example-of-no-fit-polygon-NFP_fig7_228553279
2023年11月23日 星期四
Geometric algorithms region pointer Whether the coordinates are within the shape area algorithm How to check if a given point lies inside or outside a polygon?
gui window regions SetWindowRgn SelectClipPath SelectClipRgn OffsetClipRgn ExcludeClipRect IntersetClipRec SelectClipPath
gui window regions
SetWindowRgn SelectClipPath
OffsetClipRgn ExcludeClipRect SelectClipPath
ExcludeClipRect
https://www.codeproject.com/Articles/2095/A-Guide-to-WIN32-Clipping-Regions
https://stackoverflow.com/questions/38891350/search-icon-in-edit-control-overlapped-by-input-area
https://learn.microsoft.com/zh-tw/windows/win32/api/wingdi/nf-wingdi-excludecliprect?redirectedfrom=MSDN
https://stackoverflow.com/questions/70930821/mfc-how-to-add-clear-button-inside-cedit
https://www.codeproject.com/Articles/35722/MFC-Feature-Pack-CMFCEditBrowseCtrl
https://www.codeproject.com/Articles/738/Enhanced-Focus-Edit-Control-with-Input-Filtering
https://stackoverflow.com/questions/17941527/changing-the-background-of-an-edit-control-on-getting-focus
https://stackoverflow.com/questions/8695185/why-my-edit-control-looks-odd-in-my-win32-c-application-using-no-mfc
https://www.codeproject.com/Articles/20193/The-Ultimate-Toolbox-Edit-Control-Extensions
https://www.codeproject.com/Articles/1944/Guide-to-WIN32-Regions
https://learn.microsoft.com/en-us/windows/win32/learnwin32/painting-the-window
gui window regions SetWindowRgn
gui window regions Hdc
https://www.geeksforgeeks.org/introduction-to-r-tree/
http://postgis.net/workshops/postgis-intro/indexing.html
https://github.com/StefanSalewski/RTree
http://www.gitta.info/SpatPartitio/en/html/ObjOriDecomp_learningObject2.html
https://www.pbr-book.org/3ed-2018/Primitives_and_Intersection_Acceleration/Kd-Tree_Accelerator
https://gopalcdas.com/2017/05/24/construction-of-k-d-tree-and-using-it-for-nearest-neighbour-search/
https://www.vlfeat.org/overview/kdtree.html
https://commons.wikimedia.org/wiki/File:Kd_tree_vs_skd_tree.svg
https://gamedev.stackexchange.com/questions/30208/what-is-the-kd-tree-intersection-logic
https://zh.wikipedia.org/zh-tw/K-d%E6%A0%91
https://en.wikipedia.org/wiki/R-tree
https://commons.wikimedia.org/wiki/Category:Computational_geometry
2023年11月22日 星期三
algorithm windows dc handle system HWND selectObject Device Contexts
algorithm windows dc handle system HWND selectObject Device Contexts
https://learn.microsoft.com/zh-tw/cpp/mfc/relationship-between-a-cpp-window-object-and-an-hwnd?view=msvc-170
capable of drawing lines, arrows, rectangles, and ellipses. It is also capable of writing and editing text, cut-and-paste figures as well as saving and loading the drawings. The following screenshot depicts a classic example of the Draw Application:
https://learn.microsoft.com/en-us/windows/win32/gdi/using-filled-shapes
https://www.codeproject.com/articles/1698/ms-spy-style-window-finder?fid=3083&df=90&mpp=25&prof=true&sort=position&view=normal&spc=relaxed&fr=26
https://www.codeproject.com/Articles/8216/Writing-Win32-Apps-with-C-V2-part-1
https://www.codeproject.com/Articles/1944/Guide-to-WIN32-Regions
windows mouse notification system region pointer grab cursor HDC Handle of Window Handle to Device Context
http://www.cs.sjsu.edu/~pearce/modules/lectures/mfc/chp4/chapter4.htm
https://stackoverflow.com/questions/72566733/how-to-highlight-mouse-pointer-position-using-delphi
https://stackoverflow.com/questions/66848052/how-capture-only-the-region-of-mouse-click-on-screen
https://www.hiramine.com/programming/modelvieweropenglwinapi2008/01_base.html
http://uglab.blog23.fc2.com/blog-entry-110.html
http://www.kab-studio.biz/Programing/Codian/MxA/05.html
https://claybird.sakura.ne.jp/tips/gl_01/index.html
algorithm microwindows windows select Object
algorithm microwindows windows select Handle Device Contex
https://www.researchgate.net/figure/Sliding-window-algorithm-explanation_fig1_228753893
https://www.informit.com/articles/article.aspx?p=30009&seqNum=4
windows hdc Handle Device Context area mouse click event
gui win system mouse cursor pointer get windows controls handle algorithm search HDC Region
https://www.codeproject.com/Articles/5178828/The-Explorer-Imperative-Two-Stage-Search
https://learn.microsoft.com/en-us/windows/win32/learnwin32/painting-the-window
gui win mouse cursor handle algorithm search HDC Region
region gui screen region selector
https://github.com/country-regions/react-country-region-selector#demo
gui Regions custom region selection SelectObject Polygonal Region Structures
https://github.com/SerpentAI/SerpentAI/wiki/Defining-Screen-Regions
x-window screen region selection
Xlib Pointer Grabbing
XGrabKeyboard XGrabPointer
region pointer grabbing
https://tronche.com/gui/x/xlib/input/XGrabKeyboard.html
xlib xgrabpointer
x-window screen region selection
https://en.wikipedia.org/wiki/X_Window_System_protocols_and_architecture
https://en.wikipedia.org/wiki/X_Window_selection
https://en.wikipedia.org/wiki/Selection_(user_interface)
https://github.com/search?q=x-window+screen+region+selection+language%3AC++path%3A%2F%5EPsychSourceGL%5C%2FSource%5C%2FLinux%5C%2FScreen%5C%2F%2F&type=code
https://hackage.haskell.org/
https://github.com/c-koi/libboard
https://www.freebsdsoftware.org/graphics/
https://github.com/FreeCAD/FreeCAD/tree/b239797b3e4d2c5fdbc653ae5c150309a73b4474/src/3rdParty/libkdtree/kdtree%2B%2B
Blend2D vector graphics libraries Grab Cursor screen region selection Pointer Grabbing vector graphics grabbing
repo:inanevin/LinaVG Cursor
https://github.com/search?q=repo%3Ainanevin%2FLinaVG+Cursor+&type=code
RectInRegion 判斷指定矩形的任何部分是否在區域的界限內。
https://learn.microsoft.com/zh-tw/windows/win32/api/wingdi/nf-wingdi-rectinregion
https://github.com/MicrosoftDocs/win32/blob/docs/desktop-src/gdi/region-functions.md
BOOL WINAPI RectInRegion( HRGN hrgn, const RECT *rect )
https://learn.microsoft.com/zh-tw/windows/win32/gdi/region-functions
https://learn.microsoft.com/zh-tw/windows/win32/api/wingdi/nf-wingdi-selectobject
OBJ_REGION
https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/Graphics/Gdi/constant.OBJ_REGION.html
https://learn.microsoft.com/zh-tw/windows/win32/api/wingdi/nf-wingdi-getobjecttype
https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getwindowrgn
https://github.com/Guy1524/wine/blob/easy-anti-cheat/dlls/gdi32/region.c#L673
WINEREGION gdi
mouse cursor movements showing a trail of cursors cursor trail tracking animated cursor effects
mouse cursor movements showing a trail of cursors
cursor trail tracking animated cursor effects
8 CSS & JavaScript Snippets for Creating Unique Cursor Effects
https://speckyboy.com/css-javascript-cursor-effects/
https://onextrapixel.com/20-codepen-solutions-for-awesome-mouse-effects/
20 Codepen Solutions for Awesome Mouse Effects
https://codemyui.com/rainbow-mouse-trail/
2023年10月13日 星期五
delphi controls setwindowrgn windows api "rotary" image animated border size window SetRectEmpty SetWindowRgn SubtractRect TabbedTextOutA TabbedTextOutW
https://stackoverflow.com/questions/5160151/how-can-i-control-the-border-size-of-a-window
https://stackoverflow.com/questions/8972761/delphi-cutting-glass
https://stackoverflow.com/questions/11675374/how-to-make-tframe-with-rounded-corners
https://stackoverflow.com/questions/5755719/rounded-and-titled-tpanel-in-delphi-7
https://github.com/juliomar/awesome-delphi/tree/master#graphic
AggPas
http://www.crossgl.com/aggpas/documentation/index.html
AggPas - Delphi VCL API High Fidelity 2D Graphics
Object Pascal port of a High Quality Rendering Engine for C++ (D2009 & D2010) of AggPas library AggPas is an Object Pascal native port of the Anti-Grain Geometry library - AGG, originally
Graphics32
https://github.com › graphics32
Graphics32 is a graphics library for Delphi and Lazarus. Optimized for 32-bit pixel formats, it provides fast operations with pixels and graphic primitives
Image32
Image32 - A 2D graphics library written in Delphi Pascal
https://github.com › AngusJohnson › I...image32 delphi ( github.com)
Image32 is a comprehensive 2D graphics library written entirely in Delphi Pascal, and without dependencies on other libraries.
https://stackoverflow.com/questions/29778156/graphics32-layer-rotation
https://www.codeproject.com/articles/17245/runtime-control-resizer
https://github.com/bakasurarce/tsizectrl
A Collection of Delphi/Lazarus Tips & Tricks
University of Tartu https://kodu.ut.ee › ~kiisk › Delphi-tips-tricks Show controls' hints on statusbar SetWindowRgn(Handle, rgn, TRUE) Show/hide titlebar of a form uses. Forms, Windows
https://kodu.ut.ee/~kiisk/Delphi-tips-tricks.pdf
https://hwb.com/gruhn/programming/tutorial/clear.html
Gruhn's Transparent Delphi App
https://stackoverflow.com/questions/53887931/how-make-the-same-hole-in-two-forms-on-remote-screen-client-side-based-on-ar
https://stackoverflow.com/questions/11692094/how-to-draw-extra-stuff-on-a-custom-component-after-creation-at-dt-rt
http://melander.dk/articles/alphasplash/
Alpha Blended Splash Screen in Delphi - Part 1 | MelanderBlog
https://stackoverflow.com/questions/11692094/how-to-draw-extra-stuff-on-a-custom-component-after-creation-at-dt-rt
delphi Windows Animation Library AniVCL
Windows Animation Library for Delphi
http://www.bilsen.com/windowsanimation/
https://github.com/tonghoangvu/AniVCL
GitHub - tonghoangvu/AniVCL: Animation library for Delphi VCL
https://torry.net/components/effects-and-multimedia/animation/
https://www.delphipower.xyz/graphics/the_animate_control.html
AnimationLab VCL
WladiD/AnyiQuack Animation framework
Skia4Delphi
Fearless Cross-Platform Development with Delphi: Expand your Delphi skills
Windows Animation Overview - Win32 apps
Microsoft Learn https://learn.microsoft.com › uianimation Windows Animation API is a single-threaded COM-based API that provides the following features for developers: An animation manager object Basic Concepts · Components of Windows...
AnimateWindow function (winuser.h) - Win32 apps
Microsoft Learn https://learn.microsoft.com › win32 › api Enables you to produce special effects when showing or hiding windows. There are four types of animation: roll, slide, collapse or expand, and Syntax Parameters
https://github.com/MicrosoftDocs/win32/blob/docs/desktop-src/UIAnimation/windows-animation-samples.md
windows-animation-samples.md - MicrosoftDocs/win32 GitHub https://github.com › docs › UIAnimation Shows how to use Windows Animation with your own Custom Interpolator, with Direct2D used for rendering. Grid Layout Sample, Shows how to use Windows Animation, ...
https://learn.microsoft.com/en-us/windows/win32/uianimation/scenic-animation-api-overview
https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-animatewindow
delphi windows api animated ui_animation_storyboard_status windows animation library for delphi
https://stackoverflow.com/questions/3394289/recommendations-for-a-docking-library-for-delphi-cbuilder
Recommendations for a docking library for Delphi / C++Builder? - Stack Overflow
https://www.3delite.hu/Object%20Pascal%20Developer%20Resources/filesystemdialogs.html
Delphi, C++, VB Filesystem Dialogs Library - Enhanced open file dialog & folder dialog component, file browser component
Raize components RzComps RzComps images Gradient RzComps images Gradient
https://github.com/liuhouer/ClockTool/blob/master/RzAboutEditor.pas
https://github.com/liuhouer/ClockTool/blob/master/RzGrafx.pas
https://stackoverflow.com/questions/7265416/delphi-sliding-animated-panel
animation - Delphi: sliding (animated) panel - Stack Overflow
https://stackoverflow.com/questions/7265416/delphi-sliding-animated-panel
https://github.com/NLDelphi/NLDSideBar
2023年8月18日 星期五
Window Content Size Avail Content Region GetContentRegionAvail Content Region x window system device context mouse CursorPosition position calculation area GetContentRegionAvail
https://www.codeproject.com/Articles/1944/Guide-to-WIN32-Regions
https://github.com/ocornut/imgui/issues/1281
https://github.com/ocornut/imgui
Content Region shape windows MS rgn GetWindowRgn
GetContentRegionMaxAbs / GetContentRegionAvail
https://github.com/ocornut/imgui/issues/1490
https://en.wikipedia.org/wiki/Pick%27s_theorem
shape Content Region Coordinates in the graph Position area Region Avail Using pgfplots to make economic graphs
shape Region graph area Region Avail make economic graphs Find Area Between Curves Graphs
How to Translate a Shape on a Coordinate Grid Using a Vector
whether two shapes overlap window MS shapes are overlapping
https://www.geeksforgeeks.org/find-two-rectangles-overlap/
Retrieving Raw Mouse Input with GLFW
2023年4月29日 星期六
Graphics Windows GDI Region framergn FillRgn FrameRgn InvertRgn
Graphics Windows GDI Region framergn FillRgn FrameRgn InvertRgn
https://learn.microsoft.com/en-us/windows/win32/gdi/region-functions
https://github.com/wuxc/pywin32doc/blob/master/md/win32gui.md
framergn regions setcapture windowfrompoint ptinregion offsetrgn
https://www.codeproject.com/Articles/1944/Guide-to-WIN32-Regions
https://learn.microsoft.com/en-us/windows/win32/gdi/combining-regions
https://www.codeproject.com/Articles/291/Creating-Holes-in-a-Window
https://www.flipcode.com/archives/Win32_Window_Skinning.shtml
WindowPicker - Pick any window using mouse and highlight window region
https://binaryworld.net/Main/CodeDetail.aspx?CodeId=3753
https://www.codeproject.com/Tips/127813/Using-SetCapture-and-ReleaseCapture-correctly-usua
http://www.flounder.com/setwindowrgn.htm
Custom VCL Control for getting window handles. (Spy++ style reticle) – Chapman World
https://chapmanworld.com/2018/10/04/custom-vcl-control-for-getting-window-handles-spy-style-reticle/
2022年6月19日 星期日
round rect Corner button rectangular region rounded corners Round Border CreateRoundRectRgn rectangular region rounded corners.
round rect Corner button rectangular region rounded corners Round Border
The CreateRoundRectRgn function creates a rectangular region with rounded corners.
CreatePolyPolygonRgn
CreatePolygonRgn
CreateRectRgn
CreateRectRgnIndirect
DeleteObject
ExtCreateRegion
GetRegionData
Region Functions
Regions Overview
SelectObject
https://stackoverflow.com/questions/11675374/how-to-make-tframe-with-rounded-corners
https://github.com/pauloalvis/Delphi-PraButtonStyle
https://stackoverflow.com/questions/28486521/rounded-edges-in-button-c-sharp-winforms
https://stackoverflow.com/questions/21121968/how-do-i-create-button-with-rounded-corners-edges-on-winform-c
https://stackoverflow.com/questions/5755719/rounded-and-titled-tpanel-in-delphi-7
https://stackoverflow.com/questions/11675374/how-to-make-tframe-with-rounded-corners
https://stackoverflow.com/questions/42345751/firemonkey-hide-overflow-of-round-corners-using-stylebook
https://stackoverflow.com/questions/61159652/is-there-a-way-to-shape-a-button-around-its-picture-in-delphi
wincontrols round rect Corner CreateRoundRectRgn RoundedRadDropDownButton
https://github.com/project-jedi/jvcl/blob/master/jvcl/run/JvThemes.pas
2022年5月29日 星期日
delphi form Transparent blur Msimg32.dll AlphaBlend
https://stackoverflow.com/questions/5964701/how-to-draw-a-translucent-image-on-a-form
transparent background http://delphiexamples.com/forms/transpform.html
https://sourceforge.net/projects/widget32/
https://parnassus.co/transparent-graphics-with-pure-gdi-part-2-and-introducing-the-ttransparentcanvas-class/
Form com área transparente no Lazarus/Windows
http://fanzinepas.blogspot.com/2012/06/form-com-area-transparente-no.html
THandle CreateRectRgn CreateRectRgn SetWindowRgn Winuser.h
https://www.codeguru.com/cplusplus/transparent-listbox/
https://stackoverflow.com/questions/48511634/partially-transparent-window-opengl-win32
winapi Transparent form layer GetMonitorInfo
https://www.experts-exchange.com/articles/1783/Win32-Semi-Transparent-Window.html
Layered Windows
https://docs.microsoft.com/en-us/previous-versions/ms997507(v=msdn.10)?redirectedfrom=MSDN
https://www.codeproject.com/Articles/1822/Per-Pixel-Alpha-Blend-in-C
http://suyamasoft.blue.coocan.jp/ExcelVBA/Sample/SetLayeredWindowAttributes/index.html
http://suyamasoft.blue.coocan.jp/ExcelVBA/Sample/SetLayeredWindowAttributes/index.html
https://docs.microsoft.com/en-us/windows/win32/winauto/magapi/magapi-intro
Žarko Gajić gZoom – Delphi Implementation of the Missing Mode in Windows Magnifier
https://zarko-gajic.iz.hr/gzoom-delphi-implementation-of-the-missing-mode-in-windows-magnifier/
https://www.codeproject.com/Articles/5051/Various-methods-for-capturing-the-screen
https://www.codeproject.com/Articles/607288/Screenshot-using-the-Magnification-library
2022年5月27日 星期五
How can I change the background color of a button WinAPI C++
Rectangles, Regions, and Clipping rectangular region CreateRoundRectRgn
https://miffyzzang.tistory.com/378
CreateWindow("button","",WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON | BS_BITMAP | BS_OWNERDRAW, 100,100,70,30,hWnd,(HMENU)IDC_BUTTON, hInst,NULL);
Creating Owner-Drawn Controls - Windows Programming
BS_OWNERDRAW SetButtonStyle SetWindowRgn
https://stackoverflow.com/questions/18745447/how-can-i-change-the-background-color-of-a-button-winapi-c
https://www.pablosoftwaresolutions.com/html/cimagebutton.html
#pragma comment( \
linker, \
"/manifestdependency:\"type='win32' \
name='Microsoft.Windows.Common-Controls' \
version='6.0.0.0' \
processorArchitecture='*' \
publicKeyToken='6595b64144ccf1df' \
language='*'\"")
https://www.pablosoftwaresolutions.com/html/ccolorbutton.html
https://stackoverflow.com/questions/17678261/how-to-change-color-of-a-button-while-keeping-buttons-functions-in-win32
https://stackoverflow.com/questions/8695185/why-my-edit-control-looks-odd-in-my-win32-c-application-using-no-mfc
https://stackoverflow.com/questions/18745447/how-can-i-change-the-background-color-of-a-button-winapi-c
2022年5月26日 星期四
...show controls with rounded corners?
https://www.swissdelphicenter.ch/en/showcode.php?id=921
www.teamb.com
Autor: P. Below
Homepage: http://www.teamb.com
[ Print tip ]
Tip Rating (38):
procedure MakeRounded(Control: TWinControl);
var
R: TRect;
Rgn: HRGN;
begin
with Control do
begin
R := ClientRect;
rgn := CreateRoundRectRgn(R.Left, R.Top, R.Right, R.Bottom, 20, 20);
Perform(EM_GETRECT, 0, lParam(@r));
InflateRect(r, - 5, - 5);
Perform(EM_SETRECTNP, 0, lParam(@r));
SetWindowRgn(Handle, rgn, True);
Invalidate;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
// TMemo:
Memo1.BorderStyle := bsNone;
MakeRounded(Memo1);
// TEdit:
Edit2.BorderStyle := bsNone;
MakeRounded(Edit2);
// TPanel:
MakeRounded(Panel1);
// TStaticText:
MakeRounded(StaticText1);
// TForm
Form1.BorderStyle := bsNone;
MakeRounded(Form1);
end;
Vcl.ExtCtrls.TShape corner size of RoundRect
FMX.StdCtrls.TCornerButton
https://stackoverflow.com/questions/11675374/how-to-make-tframe-with-rounded-corners
TCustomRoundShape = class(TGraphicControl)
procedure TForm1.FormPaint(Sender: TObject);
const
n = 50;
var
Rgn: HRGN;
x1,y1,x2,y2: Integer;
begin
x1 := n;
y1 := n div 2;
x2 := ClientWidth - n;
y2 := ClientHeight - n;
Rgn := CreateRoundRectRgn(x1, y1, x2, y2, n, n);
Canvas.Brush.Color := clSilver;
Canvas.Brush.Style := bsCross;
FillRgn(Canvas.Handle, Rgn, Canvas.Brush.Handle);
Canvas.Brush.Color := clRed;
Canvas.Brush.Style := bsSolid;
FrameRgn(Canvas.Handle, Rgn, Canvas.Brush.Handle, 2, 2);
DeleteObject(Rgn);
end;
https://stackoverflow.com/questions/11675374/how-to-make-tframe-with-rounded-corners
https://stackoverflow.com/questions/5755719/rounded-and-titled-tpanel-in-delphi-7
https://stackoverflow.com/questions/32987649/how-to-create-a-user-control-with-rounded-corners
...create a form with rounded corners?
Autor: Horst Kniebusch
Homepage: http://members.tripod.de/Kniebusch
[ Print tip ]
Tip Rating (38):
{
Die CreateRoundRectRgn lässt eine Form mit abgerundeten Ecken erscheinen.
The CreateRoundRectRgn function creates a rectangular
region with rounded corners
}
procedure TForm1.FormCreate(Sender: TObject);
var
rgn: HRGN;
begin
Form1.Borderstyle := bsNone;
rgn := CreateRoundRectRgn(0,// x-coordinate of the region's upper-left corner
0, // y-coordinate of the region's upper-left corner
ClientWidth, // x-coordinate of the region's lower-right corner
ClientHeight, // y-coordinate of the region's lower-right corner
40, // height of ellipse for rounded corners
40); // width of ellipse for rounded corners
SetWindowRgn(Handle, rgn, True);
end
{ The CreatePolygonRgn function creates a polygonal region. }
procedure TForm1.FormCreate(Sender: TObject);
const
C = 20;
var
Points: array [0..7] of TPoint;
h, w: Integer;
begin
h := Form1.Height;
w := Form1.Width;
Points[0].X := C; Points[0].Y := 0;
Points[1].X := 0; Points[1].Y := C;
Points[2].X := 0; Points[2].Y := h - c;
Points[3].X := C; Points[3].Y := h;
Points[4].X := w - c; Points[4].Y := h;
Points[5].X := w; Points[5].Y := h - c;
Points[6].X := w; Points[6].Y := C;
Points[7].X := w - C; Points[7].Y := 0;
SetWindowRgn(Form1.Handle, CreatePolygonRgn(Points, 8, WINDING), True);
end;