我正在尝试截取应用程序的屏幕截图,我想让不属于应用程序区域的矩形部分透明。因此,例如在标准Windows应用程序上,我想让圆角透明。我编写了一个快速的测试应用程序,它可以在XP(或关闭aero的vista/windows7)上运行:protectedoverridevoidOnPaint(PaintEventArgse){base.OnPaint(e);Graphicsg=e.Graphics;//JustfindawindowtotestwithIntPtrhwnd=FindWindowByCaption(IntPtr.Zero,"Calculator");WINDOWINFOinf