如果不知道有什么用,那么你删除它。这样就知道有什么用了。如果删除了还是不知道有什么用,那么说明它没用。其它的,google足够了。

解决方案 »

  1.   

    看到他的方法 什么时候想用就用里面有哪些东西,看下user32.dll里面有哪些函数就知道了,具体那个工具叫什么名字的忘记的了这个是 方法定义 FindWindow 方法
      

  2.   

    比如:        [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);
            }
      

  3.   

    里面东西可多了几乎所有的Windows API都在这里面,这个dll是内核代码到用户代码的关键组件。