Efeito desligamento (cinza) |
Top Previous Next |
|
procedure TForm7.Button1Click(Sender: TObject); begin ShowMessage('Tanso'); end;
procedure TForm7.FormShow(Sender: TObject); var ADC: HDC; x,y,b : Integer; Cor : Integer; begin ADC := GetDC( 0 ); BitBlt( Image.Canvas.Handle,0,0,Self.Width,Self.Height, ADC, Form7.Left, Form7.Top, srcCopy ); b := 0; y := 0; while y <= Self.Height - 1 do begin x := 0; while x <= Self.Width - 1 do begin Inc( b ); if Cor = clBlack then cor := ClGray else cor := clBlack; if Odd( b ) then SetPixel( Image.Canvas.Handle, X, Y, cor ); Inc( x ); end; Inc( b ); Inc( y ); end; ReleaseDC( 0, ADC ); end; |