在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
procedure TForm1.Button1Click(Sender: TObject); var h: HWND; FormStyle: Integer; begin h := self.Handle; FormStyle := GetWindowLong(h, GWL_EXSTYLE); SetWindowLong(h, GWL_EXSTYLE, FormStyle or WS_EX_LAYERED); SetLayeredWindowAttributes(h, 0, 128, LWA_ALPHA); end;
procedure TForm1.Button2Click(Sender: TObject); Var frmRegion, tempRegion: HRGN; i: Integer; Arect: TRect; Begin frmRegion := 0; For I:= 0 To ControlCount - 1 Do Begin Arect := Controls[i].BoundsRect; OffsetRect( aRect, clientorigin.x - left, clientorigin.y - top ); tempRegion := CreateRectRgnIndirect( aRect ); If frmRegion = 0 Then frmRegion := tempRegion Else Begin CombineRgn( frmRegion, frmRegion, tempRegion, RGN_OR ); DeleteObject( tempRegion ); End; End; tempregion := CreateRectRgn( 0, 0, Width, GetSystemMetrics( SM_CYCAPTION )+ GetSystemMetrics( SM_CYSIZEFRAME )+ GetSystemMetrics( SM_CYMENU ) * Ord(Menu <> Nil)); CombineRgn( frmRegion, frmRegion, tempRegion, RGN_OR ); DeleteObject( tempRegion ); SetWindowRgn( handle, frmRegion, true ); end;
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论