---
title: "How can i create  a Process?"  
description: "How can i create  a Process?"  
author: "Jaya J"  
published: 2015-03-13  
updated: 2015-03-14  
canonical: https://www.mindstick.com/forum/23018/how-can-i-create-a-process  
category: ".net"  
tags: ["c#"]  
reading_time: 3 minutes  

---

# How can i create  a Process?

I have 4 [forms](https://www.mindstick.com/interview/34192/what-is-the-purpose-of-the-authentication-mode-forms-element-in-web-config) namely form1,form2,form3,form4.\
form2 is main form.when i open form1([Login](https://www.mindstick.com/articles/12852/styles-login-form-in-android) [Page](https://www.mindstick.com/articles/13031/why-to-make-a-wikipedia-page)),it will open form2.After that form1 has to close.Form2 [opens](https://www.mindstick.com/news/2570/china-s-new-space-station-opens-for-business-in-an-increasingly-competitive-era-of-space-activity) form3 through openform3 [Button click](https://www.mindstick.com/forum/790/form-gets-submiited-twice-on-button-click).After opening Form3,[user](https://www.mindstick.com/articles/13001/multi-statement-table-valued-user-defined-function-in-sql-server) doesn't doing in form3,it will automatically killed.\
All this can be done using a single Process.Is it Possible?If possible tell [me the code](https://www.mindstick.com/forum/156831/can-you-tell-me-the-code-to-write-a-c-sharp-program) please........

## Replies

### Reply by Jaya J

Form2 is opened when login was successful(ie Form1).I write code for that.But when Form2 is opend,there is no use of Form1.So I have to close form1 when Login was successful.And Form3 is automatically close when there is user interaction with that Form3.And all this sholud be done in one Process.i.e,Process.Start()........I'm asking code for this.Please Help me.

### Reply by Anonymous User

Try this [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii):**Form1 Code:**

```
public partial class Form1 : Form    {        public Form1()        {            InitializeComponent();        }        private void button1_Click(object sender, EventArgs e)        {            Form2 f2 = new Form2();            f2.Show();        }    }
```

\
**Form2 Code:**

```
public partial class Form2 : Form    {              public Form2()        {                       InitializeComponent();        }        private void Form2_Load(object sender, EventArgs e)        {                    }        private void button1_Click(object sender, EventArgs e)        {            new Form3().Show();        }        private void Form2_Shown(object sender, EventArgs e)        {            new Form1().ShowDialog();        }    }
```

\
**Form3 Code:**\

```
public partial class Form3 : Form    {        public Form3()        {            InitializeComponent();        }        Timer t;        private void Form3_Load(object sender, EventArgs e)        {            t = new Timer();                        t.Tick += t_Tick;            t.Start();        }        void t_Tick(object sender, EventArgs e)        {            if (t.Interval == 60000)                this.Close();        }    }
```


---

Original Source: https://www.mindstick.com/forum/23018/how-can-i-create-a-process

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
