Take a screenshot of a particular area in Delphi 7
问题 I have a panel in the form delphi that contains pictures, labels and others. I need to take screenshots in the panel area. How can I perform this ? 回答1: Assuming that you have a panel named Panel1 to be screenshot, a button named Button1 to do the screen shoot, and Image1 to display the screenshot, here is simple code you can use: procedure TForm1.Button3Click(Sender: TObject); var bitmap: TBitmap; dc: HDC; begin bitmap := TBitmap.Create(); try dc := GetDC(Panel1.Handle); try bitmap.Width :=