如题!

解决方案 »

  1.   

    用API,具体的你只好自己去查了。我是懒得解释那烦人的API。
      

  2.   

    好吧,我给你google一下http://www.google.com.hk/#hl=zh-CN&newwindow=1&safe=strict&q=%E8%AE%B0%E4%BA%8B%E6%9C%AC+API&oq=%E8%AE%B0%E4%BA%8B%E6%9C%AC+API&aq=f&aqi=&aql=&gs_l=serp.12...30369l32876l2l34282l4l4l0l0l0l0l0l0ll0l0.frgbld.&bav=on.2,or.r_gc.r_pw.,cf.osb&fp=5cfff391e681a1b0&biw=1440&bih=807
      

  3.   

    http://ishare.iask.sina.com.cn/f/20255892.html
    这个你看看有用没有
      

  4.   

    C#启动记事本,并传递数据
    www.diybl.com    时间 : 2008-01-21  作者:佚名   编辑:本站 点击:   [ 评论 ]
    -
    -
             #region [ API: 记事本 ]        /// <summary>
            /// 传递消息给记事本
            /// </summary>
            /// <param name="hWnd"></param>
            /// <param name="Msg"></param>
            /// <param name="wParam"></param>
            /// <param name="lParam"></param>
            /// <returns></returns>
            [DllImport("User32.DLL")]
            public static extern int SendMessage(IntPtr hWnd, uint Msg, int wParam, string lParam);        /// <summary>
            /// 查找句柄
            /// </summary>
            /// <param name="hwndParent"></param>
            /// <param name="hwndChildAfter"></param>
            /// <param name="lpszClass"></param>
            /// <param name="lpszWindow"></param>
            /// <returns></returns>
            [DllImport("User32.DLL")]
            public static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow);        /// <summary>
            /// 记事本需要的常量
            /// </summary>
            public const uint WM_SETTEXT = 0x000C;        #endregion        private void button1_Click(object sender, EventArgs e)
            {
                #region [ 启动记事本 ]            System.Diagnostics.Process Proc;            try
                {
                    // 启动记事本
                    Proc = new System.Diagnostics.Process();
                    Proc.StartInfo.FileName = "notepad.exe";
                    Proc.StartInfo.UseShellExecute = false;
                    Proc.StartInfo.RedirectStandardInput = true;
                    Proc.StartInfo.RedirectStandardOutput = true;                Proc.Start();
                }
                catch
                {
                    Proc = null;
                }            #endregion            #region [ 传递数据给记事本 ]            if (Proc != null)
                {
                    // 调用 API, 传递数据
                    while (Proc.MainWindowHandle == IntPtr.Zero)
                    {
                        Proc.Refresh();
                    }                IntPtr vHandle = FindWindowEx(Proc.MainWindowHandle, IntPtr.Zero, "Edit", null);                // 传递数据给记事本
                    SendMessage(vHandle, WM_SETTEXT, 0, "Message");
                }            #endregion        } 
      

  5.   

    启动记事本用Process.Start("Notepad");控制菜单用.NET的UI Automation API,比较繁杂,参见
    http://msdn.microsoft.com/zh-cn/library/ms753107.aspx
      

  6.   

    在csdn上下载C#记事本
    http://download.csdn.net/detail/liulongyun/1831999
    http://download.csdn.net/detail/chenxh/139484
    http://download.csdn.net/detail/stivenhxm/259923http://download.csdn.net/tag/%E8%AE%B0%E4%BA%8B%E6%9C%AC/orderbydownloads