c#编程问题

来源:百度知道 编辑:UC知道 时间:2024/05/09 09:06:06
有谁可以告诉我用c#激活某个窗口或用c#某个指定窗口进行截图并且保存下来照片要不就告诉我怎摸获得某个窗口在WINDOWS桌面的位置(坐标)随便回答对1个200分只需要回答正确其中一个就OK了

这里是一个用API的例子
using System ;
using System.Drawing ;
using System.Collections ;
using System.ComponentModel ;
using System.Windows.Forms ;
using System.Data ;
using System.Drawing.Imaging ;
using System.IO ;
//导入在程序中使用到的名称空间
public class Capture : Form
{
private System.ComponentModel.Container components = null ;
private Icon mNetTrayIcon = new Icon ( "Tray.ico" ) ;
private Bitmap MyImage = null ;
private NotifyIcon TrayIcon ;
private ContextMenu notifyiconMnu ;
public Capture ( )
{
//初始化窗体中使用到的组件
InitializeComponent ( ) ;
}
protected override void OnActivated ( EventArgs e )
{
this.Hide ( ) ;
}
[ System.Runtime.InteropServices.DllImportAttribute ( "gdi32.dll" ) ]
private static extern bool BitBlt (
IntPtr hdcDest , //目标设备的句柄
int nXDest , /