Mega Code Archive

 
Categories / Delphi / Forms
 

Formunuzun ekrana yagmur gibi gelmesini ister misin

forma buton ekle yeter... procedure TForm1.Button1Click(Sender: TObject); var hh,hdev:hdc; bm:hbitmap; a,h,w:integer; begin hh:=CreateCompatibleDC(GetDC(handle)); bm:=CreateCompatibleBitmap(GetDC(handle),width,height); SelectObject(hh,bm); form1.Hide; hdev:=GetWindowDC(GetDesktopWindow); BitBlt(hh,0,0,width,height,hdev,form1.Left,form1.Top,SRCCOPY); Randomize; for a:=1 to 500000 do begin w:=random(width); h:=random(height); SetPixel(hdev,left+w,top+h,GetPixel(hh,w,h)); end; Form1.Show; end;