Ask Experts Questions for FREE Help !
Ask
    adam1998's Avatar
    adam1998 Posts: 1, Reputation: 1
    New Member
     
    #1

    Feb 9, 2015, 11:42 AM
    How to change change a form in c# to consloe
    Hi
    I have created a program in C# using form I want to change it to console but I can't seem to get it right, here is the code
    static void Main() {
    Application.EnableVisualStyles();
    Application.Run(new Form());


    namespace Triangle_Dimensions
    {
    public partial class Program : Form
    {
    public Form1()
    {
    InitializeComponent();
    }


    private void btnPerimeter_Click(object sender, EventArgs e)
    {
    decimal side1 = decimal.Parse(txtside1.Text);


    decimal side2 = decimal.Parse(txtside2.Text);


    decimal side3 = decimal.Parse(txtside3.Text);
    decimal perimeter;
    perimeter = side1 + side2 + side3;
    MessageBox.Show("The perimeter of the triangle is " + perimeter +"cm", " Triangle Perimeter Calculation");










    }


    private void btnArea_Click(object sender, EventArgs e)
    {
    decimal height = decimal.Parse(txtHeight.Text);


    decimal Base = decimal.Parse(txtBase.Text);




    decimal area;
    area = Base * height / 2;
    MessageBox.Show("The area of the triangle is " + area + " cm square", " Triangle Area Calculation");


    }


    private void btnHeight_Click(object sender, EventArgs e)
    {
    decimal area = decimal.Parse(txtArea.Text);


    decimal Base = decimal.Parse(txtBaseT.Text);




    decimal height;
    height = area * 2 / Base ;
    MessageBox.Show("The height of the triangle is " + height + " cm cubic", " Triangle Height Calculation");


    }


    private void btnReset_Click(object sender, EventArgs e)
    {
    txtside1.Clear();
    txtside2.Clear();
    txtside3.Clear();
    txtArea.Clear();


    txtBase.Clear();
    txtBaseT.Clear();
    txtHeight.Clear();



    }
    }
    }

    I have changed messageBox.show to console.read but I keep getting errors could I get some help in this please.

Check out some similar questions!

Where do I find a Change of Jurisdiction form? [ 1 Answers ]

Both myself and my ex wife were divorced from each other in the state of Utah. We have both now moved to Clark county Nevada. Where can I find the proper form to have jurisdiction changed to here? Our daughter lives with her mom and our son lives with me, but we both are now in Clark county.

Amended in Change of Ownership form [ 2 Answers ]

I live in Milpitas, CA. My parents sold me their house. Since the house was paid off, there was no escrow involved. We only filed a new Grant Deed and Change of Ownership form. Unfortunately, at the time of filling the paperwork, we didn't realized the "Value of Trade" field is the "selling...

I used a change of address form online [ 0 Answers ]

HI there, I used Change of Address Form - Free Change of Address - Powered by WhiteFence and was wondering if anyone else has. It's making my mail a little late, either that or it just didn't work...

Form for address change EIN and 501c [ 4 Answers ]

Our church has its EIN number and of course we are a registered 501C3 but we have moved the church office, I have looked and could not find, and "tax time" so calls to IRS have been no help. I need to put in a change of address for our EIN and to update the info for our 501C3 What forms do I...

What is 'change agent' or 'change maker' or 'change' in Sanskrit? [ 1 Answers ]

What is 'change agent' or 'change maker' or 'change' in Sanskrit?


View more questions Search
 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.