Click here to Skip to main content
15,887,421 members
Home / Discussions / C#
   

C#

 
GeneralRe: File being used by another process? I don't think so! Pin
lukeer1-May-11 21:22
lukeer1-May-11 21:22 
AnswerRe: File being used by another process? I don't think so! Pin
I Believe In GOD1-May-11 9:12
I Believe In GOD1-May-11 9:12 
AnswerRe: File being used by another process? I don't think so! Pin
BobJanova3-May-11 1:33
BobJanova3-May-11 1:33 
Questionsaving values in forms of c# Pin
aeman1-May-11 2:03
aeman1-May-11 2:03 
AnswerRe: saving values in forms of c# Pin
DaveyM691-May-11 2:12
professionalDaveyM691-May-11 2:12 
GeneralRe: saving values in forms of c# Pin
aeman1-May-11 2:27
aeman1-May-11 2:27 
GeneralRe: saving values in forms of c# Pin
DaveyM691-May-11 4:34
professionalDaveyM691-May-11 4:34 
AnswerRe: saving values in forms of c# Pin
I Believe In GOD1-May-11 2:28
I Believe In GOD1-May-11 2:28 
That's easy , have no worries

Form1 Code :
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form2 form2;
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (form2 == null)
            {
                form2 = new Form2(this);
                form2.Show();
            }
            else
            {
                form2.Show();
            }
            this.Hide();
            button2.BackColor = Color.Green;
        }
    }
}



Form2 Code :

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class Form2 : Form
    {
        public Form form1;
        public Form2(Form form1)
        {
            InitializeComponent();
            this.form1 = form1;
        }

        private void Form2_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (form1 == null)
            {
                form1 = new Form();
                form1.Show();
                
            }
            else
            {
                form1.Show();
            }
            this.Hide();
        }
    }
}



Form1 Is The Main Form
I know nothing , I know nothing ...

GeneralRe: saving values in forms of c# Pin
aeman1-May-11 2:56
aeman1-May-11 2:56 
GeneralRe: saving values in forms of c# Pin
I Believe In GOD1-May-11 2:58
I Believe In GOD1-May-11 2:58 
GeneralRe: saving values in forms of c# Pin
Pete O'Hanlon2-May-11 6:27
mvePete O'Hanlon2-May-11 6:27 
GeneralRe: saving values in forms of c# Pin
DaveyM691-May-11 4:24
professionalDaveyM691-May-11 4:24 
GeneralRe: saving values in forms of c# Pin
Prasanta_Prince1-May-11 8:52
Prasanta_Prince1-May-11 8:52 
QuestionMatlab-to-C# Pin
harrykan30-Apr-11 23:39
harrykan30-Apr-11 23:39 
AnswerRe: Matlab-to-C# Pin
I Believe In GOD1-May-11 1:14
I Believe In GOD1-May-11 1:14 
AnswerRe: Matlab-to-C# Pin
Dave Kreskowiak1-May-11 3:36
mveDave Kreskowiak1-May-11 3:36 
QuestionHow to use MF_BYPOSITION parameter in InsertMenu Function Pin
Loithuxua30-Apr-11 16:37
Loithuxua30-Apr-11 16:37 
AnswerRe: How to use MF_BYPOSITION parameter in InsertMenu Function Pin
OriginalGriff30-Apr-11 20:29
mveOriginalGriff30-Apr-11 20:29 
GeneralRe: How to use MF_BYPOSITION parameter in InsertMenu Function Pin
David198730-Apr-11 21:00
David198730-Apr-11 21:00 
GeneralRe: How to use MF_BYPOSITION parameter in InsertMenu Function Pin
OriginalGriff30-Apr-11 21:04
mveOriginalGriff30-Apr-11 21:04 
GeneralRe: How to use MF_BYPOSITION parameter in InsertMenu Function Pin
Dave Kreskowiak1-May-11 3:38
mveDave Kreskowiak1-May-11 3:38 
AnswerRe: How to use MF_BYPOSITION parameter in InsertMenu Function Pin
I Believe In GOD1-May-11 1:42
I Believe In GOD1-May-11 1:42 
QuestionUsing own .dll in 64 bit version system - exception: ""BadImageFormatException was unhandled"" Pin
Cadi210830-Apr-11 10:20
Cadi210830-Apr-11 10:20 
AnswerRe: Using own .dll in 64 bit version system - exception: ""BadImageFormatException was unhandled"" [modified] Pin
Luc Pattyn30-Apr-11 10:43
sitebuilderLuc Pattyn30-Apr-11 10:43 
GeneralRe: Using own .dll in 64 bit version system - exception: ""BadImageFormatException was unhandled"" Pin
Cadi210830-Apr-11 23:14
Cadi210830-Apr-11 23:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.