感谢pinglan的方法

来源:互联网 发布:最新网络数字用语1 编辑:程序博客网 时间:2024/04/25 07:20

同咨询http://topic.csdn.net/t/20060927/21/5052858.html 的问题,得到了pinglan的方案,顺利通过,在此感谢!!

 

pinglan()回复于 2006-09-28 13:48:23 得分 2

///////////////在程序入口文件(一般是Program.cs)中这样写////////////  
  using   System;  
  using   System.Collections.Generic;  
  using   System.Windows.Forms;  
  namespace   CCRegister  
  {  
          static   class   Program  
          {  
                  ///   <summary>  
                  ///   The   main   entry   point   for   the   application.  
                  ///   </summary>  
                  [STAThread]  
                  static   void   Main()  
                  {  
                          //*****主要看下面************  
                          //你的登陆窗口frmLogin  
                          Form   login   =   new   frmLogin();  
                          if   (login.ShowDialog()   ==   DialogResult.OK)  
                          {  
                                  //你准备新打开的窗口frmMain  
                                  Application.Run(new   frmMain());  
                          }  
                  }  
          }  
  }  
  //////////////在你的登陆窗口验证成功的代码后面写///////  
       
  this.DialogResult   =   DialogResult.OK;//成功  
   
  //相信可以解决你的问题 

原创粉丝点击