Create an irregular window

xiaoxiao2021-03-06  62

// Method 1: Utilize irregular images

(1) Procedure TFORM1.FormCreate (Sender: TOBJECT); Begin Self.ClientWidth: = HotiMage1.width; self.clientHeight: = hotimage1.height; brush.style :=bsclear;

(2) Set the Border attribute of the Form1 to Bssizeable

(3) Place a TIMAGE on Form1, set its Transparent property to TRUE, and set an irregular image in TIMAGE.PICTURE

// Method Two

Procedure TForm1.FormCreate (Sender: TOBJECT); VAR HR: THANDLE; Begin // Hr: = CreatellipticRGN (self., self.top, self.width, self.height); hr: = cretellipticRGN (0, self.height- Self.clientHeight, Self.ClientWidth, Self.ClientHeight; SetWindowRgn (Handle, HR, True);

转载请注明原文地址:https://www.9cbs.com/read-118804.html

New Post(0)