奇怪,msdn上说有啊。Platforms:Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition参考:
http://msdn.microsoft.com/en-us/library/system.windows.forms.application.restart(v=vs.80).aspx

解决方案 »

  1.   

    那是因为我缺少引用吗??下面是我的引用
    using System;
    using System.IO;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;
    using System.Text.RegularExpressions;
    using System.Data.SqlClient;
    using System.Xml;
      

  2.   


    刚才我看了下1楼的,确实有Restart这个函数的啊
    如果你那里没有Restart的话,可以触发个什么事件,写在Program中重新实例化
      

  3.   


    Shuts down the application and starts a new instance immediately.Namespace: System.Windows.Forms
    Assembly: System.Windows.Forms (in system.windows.forms.dll)没有缺少,就在System.Windows.Forms中,但跟你调用Application.Restart()的域/位置相关,直接在一个类下而不是方法中肯定没有Restart的
      

  4.   

    3楼,你说的是wince系统吗?为什么我的没有啊,缺少引用啊还是别的什么呀
      

  5.   

    3楼,我是在一个按钮中写的
    private void btnSave_Click(object sender, EventArgs e)
            {
                Application.Restart();
            }
    提示错误 “System.Windows.Forms.Application”并不包含“Restart”的定义
      

  6.   

    我是放在按钮的click事件中的啊
      

  7.   

    汗~~ WINCE确实没,用事件吧?
    写在program中看看如何?
      

  8.   

    wince中程序重新启动需要用API,不过同样感谢两位,哈哈