WinForm账号切换功能的实现

public static void ReLoign()
{
   Application.ExitThread();
   Thread thtmp = new Thread(new ParameterizedThreadStart(Run));
   object appName = Application.ExecutablePath;
   Thread.Sleep(1);
   thtmp.Start(appName);
}

private static void Run(Object appName)
{
   Process ps = new Process
   {
      StartInfo = new ProcessStartInfo{FileName = appName.ToString()}
   };
   ps.Start();
}
//账号切换 调用 ReLoign();

 

赞(1)
未经允许不得转载:TaKaSa » WinForm账号切换功能的实现