here's the code....
//FORM1
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace WindowsFormsApplication3
{
public partial class Admin_Calculator : Form
{
public Admin_Calculator()
{
InitializeComponent();
}
private decimal MultiplyNumbers(decimal number1, decimal number2)
{
return number1 * number2;
}
private void button1_Click(object sender, EventArgs e)
{
decimal value1 = decimal.Parse (SPOT.Text);
decimal value2 = decimal.Parse (textBox2.Text);
decimal returnValue1 = MultiplyNumbers(value1, value2);
textBox13.Text = returnValue1.ToString();
}
}
}
------------------------------------
//FORM2
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication3
{
public partial class Display_Calculator : Form
{
public Display_Calculator()
{
InitializeComponent();
}
private decimal MultiplyNumbers(decimal number1, decimal number2)
{
return number1 * number2;
}
private void button1_Click(object sender, EventArgs e)
{
decimal value1 = decimal.Parse(textBox12.Text);
decimal value2 = decimal.Parse(textBox18.Text);
decimal returnValue1 = MultiplyNumbers(value1, value2);
textBox24.Text = returnValue1.ToString();
}
private void textBox12_TextChanged(object sender, EventArgs e)
{
textBox12 = Admin_Calculator.textBox13.Text;
}
}
}
these two forms are independent, there is no button on form1 which opens the form2...