Having a minor issue at the moment, can't figure out what's wrong even though it's right in front of me! When I click the button on my calculator it doesnt enter it into my textbox.
I've the textbox set to readonly and TabStop is also set to false.
Anyone know what I'm doing wrong?
Code so far..
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 BasicCalculator
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
// variables to hold operands
private double valueHolder1;
private double valueHolder2;
// variable to hold temporary values
private double tempValue;
// True if '.' is use else false
private bool hasDecimal = false;
private bool inputStatus = true;
// variable to hold Operator
private string calcFunc;
//Button for integer 0
private void button1_Click(object sender, EventArgs e)
{
//Check the input Status
if (inputStatus)
{
//If True
//Check to make sure the
//inputbox has a value
if (txtInput.Text.Length >= 1)
{
//Add zero
txtInput.Text += button1.Text;
}
}
}
}
}
This post has been edited by irishgirl: 15 September 2009 - 06:21 AM

New Topic/Question
Reply




MultiQuote




|