一、 (30分)设计简单的页面计算器,页面效果如下图示,要求如下。

来源:百度知道 编辑:UC知道 时间:2024/06/09 15:34:58
急等

- -
看不见效果图
以前做过,还保留代码的。拷下
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication4
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
txtHidden1.Text = "";
txtHidden1.Visible = false;
txtHidden2.Text = "";
txtHidden2.Visible = false;//txtHidden1和txtHidden2的功能都是临时存放操作符
txtTemp.Text = "";//txtTemp的功能是存放临时结果
txtTemp.Visible = false;
txtResult.Text = "0";
txtResult.ReadOnly = true;//txtResult的功能是结果的显示以及数字的输入
}

private void btn0_Click(object sender, EventArgs e)//按钮0
{
PressNumBtn(sender);
}

private void btn1_Click(object sender, EventArgs e)//按钮1
{
PressNumBtn(sender);
}