55 lines
1.1 KiB
Plaintext
55 lines
1.1 KiB
Plaintext
unit DAngle;
|
|
|
|
interface
|
|
|
|
uses
|
|
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
|
|
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ExtCtrls;
|
|
|
|
type
|
|
TDlgAngle = class(TForm)
|
|
private
|
|
{ Private declarations }
|
|
public
|
|
{ Public declarations }
|
|
procedure ShowAngle(const aRect: TRect);
|
|
end;
|
|
|
|
var
|
|
DlgAngle: TDlgAngle;
|
|
|
|
implementation
|
|
|
|
{$R *.dfm}
|
|
|
|
procedure TDlgAngle.ShowAngle(const aRect: TRect);
|
|
var
|
|
RectRgn1,
|
|
RectRgn2,
|
|
RectRgn3 : THandle;
|
|
Monitor: TMonitor;
|
|
// x, y : integer;
|
|
begin
|
|
// x := Width - ClientWidth;
|
|
// y := Height - ClientHeight;
|
|
// hEllipse := CreateEllipticRgn(x, y, ClientWidth, ClientHeight);
|
|
|
|
Left := aRect.Left;
|
|
Top := aRect.Top;
|
|
Width := aRect.Right - aRect.Left;
|
|
Height := aRect.Bottom - aRect.Top;
|
|
|
|
RectRgn1 := CreateRectRgn(0, 0, Width, Height);
|
|
RectRgn2 := CreateRectRgn(0, 0, Width, Height);
|
|
RectRgn3 := CreateRectRgn(10, 10, Width-10, Height-10);
|
|
CombineRgn(RectRgn1, RectRgn2, RectRgn3, RGN_XOR);
|
|
SetWindowRgn(Handle, RectRgn1, True);
|
|
DeleteObject(RectRgn1);
|
|
DeleteObject(RectRgn2);
|
|
DeleteObject(RectRgn3);
|
|
|
|
Show;
|
|
end;
|
|
|
|
end.
|