whats new ¦  programming tips ¦  indy articles ¦  intraweb articles ¦  informations ¦  links ¦  interviews
 misc ¦  tutorials ¦  Add&Win Game

Tips (1541)

Database (90)
Files (137)
Forms (107)
Graphic (114)
IDE (21)
Indy (5)
Internet / LAN (130)
IntraWeb (0)
Math (76)
Misc (126)
Multimedia (45)
Objects/
ActiveX (51)

OpenTools API (3)
Printing (35)
Strings (83)
System (266)
VCL (242)

Top15

Tips sort by
component


Search Tip

Add new Tip

Add&Win Game

Advertising

91 Visitors Online


 
...make a polygon hole on a form?
Autor: Mohammad Khorsandy
[ Print tip ]  

Tip Rating (10):  
     




type
  
PtsType = array [0..15, 0..1] of Integer;

const
  
Pts: PtsType = ((0, 0), (800, 0), (800, 600),
    (200, 600), (200, 220), (300, 280),
    (265, 205), (350, 117), (205, 170),
    (120, 90), (130, 200), (60, 350), (200, 220),
    (200, 600), (0, 600), (0, 0));

procedure TForm1.Button1Click(Sender: TObject);
var
  
HRegion1: THandle;
begin
  
HRegion1 := CreatePolygonRgn(Pts, SizeOf(Pts) div 8, alternate);
  SetWindowRgn(Handle, HRegion1, True);
end;

 

Rate this tip:

poor
very good


Copyright © by SwissDelphiCenter.ch
All trademarks are the sole property of their respective owners