Getting my program to re-run

Hey! I'm making my first program and so far it is going good. It is a calculator that converts pica value between adobe InDesign and Photoshop. With the help of my dad it will calculate and give me an answer when I press the button, but if I change the values and press the button again it won't reevaluate. I have copied the code below. (ignore the comments they are code that I forgot to remove) Thanks for the Help!

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 WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { } private void Calcbutt_Click(object sender, EventArgs e) { int len1 = int.Parse(lenval1.Text); int wid1 = int.Parse(widval1.Text); double len2 = double.Parse(lenval2.Text); double wid2 = double.Parse(widval2.Text); //string lengthAnswer = lenans.Text; //string widthAnswer = widans.Text; double l = (len1 + len2 / 12); double w = (wid1 + wid2 / 12); lenans.Text = l.ToString("F3"); widans.Text = w.ToString("F3"); } } } 

by TomGraphy via /r/csharp

Leave a Reply