一个一直迷惑我很久的问题,希望能得到高手们的帮助 如果不知道有什么用,那么你删除它。这样就知道有什么用了。如果删除了还是不知道有什么用,那么说明它没用。其它的,google足够了。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 看到他的方法 什么时候想用就用里面有哪些东西,看下user32.dll里面有哪些函数就知道了,具体那个工具叫什么名字的忘记的了这个是 方法定义 FindWindow 方法 比如: [DllImport("user32.dll")] public static extern IntPtr FindWindow(string lpClassName, string lpWindowName); [DllImport("user32.dll")] public static extern IntPtr SetForegroundWindow(IntPtr hWnd); private void button10_Click(object sender, EventArgs e) { IntPtr calculatorHandle = FindWindow(null , "计算器"); if (calculatorHandle == IntPtr.Zero) { MessageBox.Show("Calculator is not running."); return; } SetForegroundWindow(calculatorHandle); SendKeys.SendWait("111"); SendKeys.SendWait("*"); SendKeys.SendWait("11"); SendKeys.SendWait("="); } [DllImport("user32.dll")] static extern bool SetCursorPos(int X, int Y); private void button10_Click(object sender, EventArgs e) { SetCursorPos(800, 600); } 里面东西可多了几乎所有的Windows API都在这里面,这个dll是内核代码到用户代码的关键组件。 关于全排列的代码,请教如何用递归写。 基础的反射问题,请帮忙! 用字符构造Font的问题 如何去掉money数据类型后面默认的小数点和0 怎样将Tue Oct 10 20:15 AM 类型的时间转换为标准时间 C# 100分求日期问题 菜鸟求教 C语言程序,找错,关于通讯录的 高手帮帮忙,如何获取光标所在区域的控件名!谢谢~~~~~~~~ 关于《programming c#》的一个异步i/o的问题: 按ctrl+F5和直接按F5运行的区别? 高手来看看下面代码怎么修改
public static extern IntPtr FindWindow(string lpClassName, string lpWindowName); [DllImport("user32.dll")]
public static extern IntPtr SetForegroundWindow(IntPtr hWnd); private void button10_Click(object sender, EventArgs e)
{
IntPtr calculatorHandle = FindWindow(null , "计算器");
if (calculatorHandle == IntPtr.Zero)
{
MessageBox.Show("Calculator is not running.");
return;
}
SetForegroundWindow(calculatorHandle);
SendKeys.SendWait("111");
SendKeys.SendWait("*");
SendKeys.SendWait("11");
SendKeys.SendWait("=");
} [DllImport("user32.dll")]
static extern bool SetCursorPos(int X, int Y); private void button10_Click(object sender, EventArgs e)
{
SetCursorPos(800, 600);
}