今天写个程序 需要抓屏 懒得写代码 上网找
突然想到QQ的抓屏不错 直接拿来用就是了
[ DllImport( “CameraDll.dll”, EntryPoint=”CameraSubArea”, CharSet=CharSet.Ansi )]
private static extern bool CameraSubArea();
if(CameraSubArea())
{
IDataObject iData = System.Windows.Forms.Clipboard.GetDataObject();
if(iData.GetDataPresent(“System.Drawing.Bitmap”,true))
{
this.pictureBox1.Image=iData.GetData(“System.Drawing.Bitmap”) as Bitmap;
}
}