当前位置: 首页>>代码示例>>C#>>正文


C# Form1.Show方法代码示例

本文整理汇总了C#中System.Form1.Show方法的典型用法代码示例。如果您正苦于以下问题:C# Form1.Show方法的具体用法?C# Form1.Show怎么用?C# Form1.Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Form1的用法示例。


在下文中一共展示了Form1.Show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: agregarToolStripMenuItem_Click

 private void agregarToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Form1 addUser = new Form1();
     addUser.setFatherView(this);
     this.Hide();
     addUser.Show();
 }
开发者ID:CristianFranco,项目名称:SistemaDietas,代码行数:7,代码来源:Principal.cs

示例2: timer1_Tick

        private void timer1_Tick(object sender, EventArgs e)
        {
            eiei++;
            switch (eiei)
            {
                case 1:
                    pictureBox1.Image = MDGame.Properties.Resources.Load2;
                    break;
                case 2:
                    pictureBox1.Image = MDGame.Properties.Resources.Load3;
                    break;
                case 3:
                    pictureBox1.Image = MDGame.Properties.Resources.Load4;
                    break;
                case 4:
                    Form1 gameView = new Form1();
                    gameView.Show();
                    this.Hide();
                    timer1.Stop();
                    break;
                //case 5:
                //    Form1 gameView = new Form1();
                //    gameView.Show();
                //    this.Hide();
                //    timer1.Stop();
                //    break;

            }
        }
开发者ID:MegaDefenseGame,项目名称:MDGame,代码行数:29,代码来源:LoadingForm.cs

示例3: pictureBoxSubmit_Click

        private void pictureBoxSubmit_Click(object sender, EventArgs e)
        {
            string UserNameDb = null;

            string UserName = textBoxUserName.Text;
            string Password = textBoxPassword.Text;

            DataSet dataSet1 = User.IsUserNameExist(UserName,Password);

            foreach (DataRow row in dataSet1.Tables["UserName"].Rows)
            {
                UserNameDb = string.Format("{0}", row["UserName"]);
            }

            if (UserNameDb != null)
            {
                Form1 frm1 = new Form1();
                frm1.PassValue = textBoxUserName.Text;
                this.Visible = false;
                frm1.Show();

            }
            else
            {
                labelError.Visible = true;
                labelError.Text = "UserName or Password is Incorrect";
            }
        }
开发者ID:ududsha,项目名称:LabSysCS,代码行数:28,代码来源:LoginForm.cs

示例4: BtnHRManagement_Click

 private void BtnHRManagement_Click(object sender, EventArgs e)
 {
     Form1 MainScreen = new Form1();
     MainScreen.treeView1.SelectedNode = MainScreen.treeView1.Nodes[3];
     this.Hide();
     MainScreen.Show();
 }
开发者ID:JunaidSarfraz,项目名称:SchoolSystem,代码行数:7,代码来源:StartScreen.cs

示例5: Level2_Click

 /// <summary>
 /// Loads a level
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Level2_Click(object sender, EventArgs e)
 {
     GameWorld.LoadGameState();
     GameWorld.eng.StopAllSounds();
     Form1 game = new Form1();
     game.Show();
     this.Hide();
 }
开发者ID:stetar,项目名称:The-Goodnight-Man,代码行数:13,代码来源:LevelMenu.cs

示例6: Main

 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     Form1 Game = new Form1();
     Game.Show();
     Game.GameLoop();
     Environment.Exit(0);
 }
开发者ID:Easihh,项目名称:C-Sharp-Avenger,代码行数:9,代码来源:Program.cs

示例7: axWindowsMediaPlayer1_PlayStateChange

        private void axWindowsMediaPlayer1_PlayStateChange(object sender, AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e)
        {
            if (e.newState == 8)
            {
                Form1 N = new Form1(this);
                this.Visible = false;
                N.Show();

            }
        }
开发者ID:YousefRabieKhalil,项目名称:N-Puzzle-Solver,代码行数:10,代码来源:FirstForm.cs

示例8: Main

        static void Main(string[] args)
        {
            Form1 frm = new Form1();
            frm.Show();
            Process[] proc = Process.GetProcesses();
            IntPtr hwnd = IntPtr.Zero;
            foreach (var pr in proc)
            {
                hwnd = pr.MainWindowHandle;
                if (hwnd != IntPtr.Zero)
                {
                    int length = GetWindowTextLength(hwnd);
                    StringBuilder bd = new StringBuilder(length+ 1);
                    GetWindowText(hwnd, bd, bd.Capacity);
                    Console.WriteLine(bd.ToString());
                    ShowWindow(bd);
                }
            }
            
            //IntPtr hwnd = FindWindow("IEFrame", "Google - Microsoft Internet Explorer");
            //if (hwnd == IntPtr.Zero)
            //{
            //    Console.WriteLine("Calculator is not running");
            //    return;
            //}
            //SetForegroundWindow(hwnd);
            //Thread.Sleep(500);            
            ////SendKeys.SendWait("coolkamal89");
            ////Thread.Sleep(500);
            //SendKeys.SendWait("coolkamal89");
            //Thread.Sleep(500);
            //SendKeys.SendWait("{Enter}");

            //Object o = null;
            //InternetExplorer ie = new InternetExplorer();
            //object url = "http://www.gmail.com";
            //ie.Navigate2(ref url, ref o,ref o,ref o,ref o);
            //ie.Visible = true;
            //do
            //{
            //} while (ie.Busy);
            //HTMLDocument doc =  (HTMLDocument)ie.Document;
            ////IHTMLElementCollection htmlcollection;
            //HTMLInputElement inputgmail = (HTMLInputElement)doc.getElementsByName("Email").item(null, 0);
            //inputgmail.value = "arif788";
            //Thread.Sleep(500);
            //HTMLInputElement inputpass = (HTMLInputElement)doc.getElementsByName("Passwd").item(null, 0);

            //Thread.Sleep(500);
            //HTMLButtonElement submit = (HTMLButtonElement)doc.getElementsByName("signIn").item(null, 0);
            //submit.click();
            //BusyFunction(ie);
            //MessageBox.Show("user logged in");

        }
开发者ID:EdiCarlos,项目名称:MyPractices,代码行数:55,代码来源:Program.cs

示例9: Main

 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     using (Form1 frm = new Form1())
     {
         frm.Show();
         frm.InitializeGraphics();
         Application.Run(frm);
     }
 }
开发者ID:ashepelev,项目名称:computer-graphics,代码行数:11,代码来源:Program.cs

示例10: simpleButton1_Click

 private void simpleButton1_Click(object sender, EventArgs e)
 {
     if (textBox1.Text == "admin" || textBox2.Text == "admin")
     {
         Form1 f1 = new Form1();
         f1.Show();
         this.Hide();
     }
     else
     {
         DialogResult dialogResult = MessageBox.Show("Username or Password is Wrong!", "Warning", MessageBoxButtons.OK);
     }
 }
开发者ID:Willy-Docksha,项目名称:Final-Project-IMK,代码行数:13,代码来源:Login.cs

示例11: button1_Click

 private void button1_Click(object sender, EventArgs e)
 {
     string[] saveconf=new string[5];
     saveconf[0] = textBox1.Text;
     saveconf[1] = textBox2.Text;
     saveconf[2] = textBox3.Text;
     saveconf[3] = textBox4.Text;
     saveconf[4] = textBox5.Text;
     Myconf.setInfor(saveconf);
     Form1 mainView = new Form1(Myconf);
     mainView.Show();
     Myconf.SaveConf();
     this.Hide();
 }
开发者ID:ChangTian1992,项目名称:WarehouseDesktop,代码行数:14,代码来源:Form3.cs

示例12: Accept_Click

        private void Accept_Click(object sender, EventArgs e)
        {
            if (textBox1.Text != "")
            {
                Form1 mainForm1 = new Form1();
                delPassData del = mainForm1.to_pass;
                del(this);
                Hide();
                mainForm1.Show();

            }
            else
            {
                MessageBox.Show("Nie wprowadzono danych dla aktualizacji. Uzupełnii puste pola");
            }
        }
开发者ID:mortalboy,项目名称:Update_Manager,代码行数:16,代码来源:NewUpdate.cs

示例13: Accept_Click

        private void Accept_Click(object sender, EventArgs e)
        {
            if (uiComboBox1.Text != "")
            {

                Form1 mainForm1 = new Form1();
                delPassData del = mainForm1.to_pass;
                del(this, Convert.ToInt32(_updateId));
                Hide();
                mainForm1.Show();

            }
            else
            {
                MessageBox.Show("Nie wybrano żadnej aktualizaji. Wybierz aktualizację z listy.");
            }
        }
开发者ID:mortalboy,项目名称:Update_Manager,代码行数:17,代码来源:ExistingUpdate.cs

示例14: btnAgregar_Click

        private void btnAgregar_Click(object sender, EventArgs e)
        {
            VehiculosCL oVehiculosCl = new VehiculosCL();
            oVehiculosCl.InsertarVehiculo(txtmatricula.Text, txtmarca.Text);
            if (oVehiculosCl.IsError)
            {
                MessageBox.Show(oVehiculosCl.ErrorDescripcion, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                Form1 oPrincipal = new Form1();
                this.Close();
                oPrincipal.Show();
                MessageBox.Show("Vehiculo agregado", "Informacion", MessageBoxButtons.OK, MessageBoxIcon.Information);

            }
        }
开发者ID:pumba3211,项目名称:CSharp,代码行数:17,代码来源:AgregarVehiculo.cs

示例15: Main

        static void Main(string[] args)
        {
            // Disable the WinForms unhandled exception dialog.
            // SurfaceShell will notify the user.
            Application.SetUnhandledExceptionMode(UnhandledExceptionMode.ThrowException);
            //Application.Run(new Form1());
            Form1 form = new Form1();
            form.startCOVER(args);
            form.Show();

            // the loop is here to keep app running if non-fatal exception is caught.
            do
            {
                Application.DoEvents();
                form.Frame();
            }
            while (!form.IsDisposed);
        }
开发者ID:nixz,项目名称:covise,代码行数:18,代码来源:Program.cs


注:本文中的System.Form1.Show方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。