C # windows Calculator

Source: Internet
Author: User

Using System;
Using System. Drawing;
Using System. Windows;
Using System. Windows. Forms;
Using System. Collections;
Using System. ComponentModel;
Using System. Data;

Namespace comput
{
/// <Summary>
/// This is a simple implementation of a calculator.
/// </Summary>

Public class Form1: System. Windows. Forms. Form
{
# Region control declaration

Private System. Windows. Forms. TextBox txtShow;
Private System. Windows. Forms. GroupBox groupBox1;
Private System. Windows. Forms. Button btn_rev;
Private System. Windows. Forms. Button btn_dot;
Private System. Windows. Forms. Button btn_add;
Private System. Windows. Forms. Button btn_equ;
Private System. Windows. Forms. Button btn_sign;
Private System. Windows. Forms. Button btn_sub;
Private System. Windows. Forms. Button btn_mul;
Private System. Windows. Forms. Button btn_0;
Private System. Windows. Forms. Button btn_3;
Private System. Windows. Forms. Button btn_2;
Private System. Windows. Forms. Button btn_1;
Private System. Windows. Forms. Button btn_6;
Private System. Windows. Forms. Button btn_5;
Private System. Windows. Forms. Button btn_4;
Private System. Windows. Forms. Button btn_sqrt;
Private System. Windows. Forms. Button btn_div;
Private System. Windows. Forms. Button btn_7;
Private System. Windows. Forms. Button btn_8;
Private System. Windows. Forms. Button btn_9;
Private System. Windows. Forms. MainMenu mainMenu1;
Private System. Windows. Forms. MenuItem menuItem1;
Private System. Windows. Forms. Button btn_sqr;
Private System. Windows. Forms. MenuItem menuItem2;
Private System. Windows. Forms. MenuItem menuItem3;
Private System. Windows. Forms. MenuItem menuItem4;
Private System. Windows. Forms. MenuItem menuItem5;
Private System. Windows. Forms. MenuItem menuItem6;
Private System. Windows. Forms. Button c;
Private System. Windows. Forms. Button ce;
Private System. Windows. Forms. MenuItem menuItem8;
Private System. Windows. Forms. MenuItem menuItem9;
Private System. Windows. Forms. MenuItem menuItem10;
/// <Summary>
/// Required designer variables.
/// </Summary>
Private System. ComponentModel. Container components = null;


Public Form1 ()
{
//
// Required for Windows Form Designer support
//
InitializeComponent ();

//
// TODO: add Any constructor code after InitializeComponent calls
//
}



/// <Summary>
/// Clear all resources in use.
/// </Summary>
Protected override void Dispose (bool disposing)
{
If (disposing)
{
If (components! = Null)
{
Components. Dispose ();
}
}
Base. Dispose (disposing );
}
# Endregion

# Region control attributes method Windows Form Designer generated code
/// <Summary>
/// The designer supports the required methods-do not use the code editor to modify
/// Content of this method.
/// </Summary>
Private void InitializeComponent ()
{
System. Resources. ResourceManager resources = new System. Resources. ResourceManager (typeof (Form1 ));
This.txt Show = new System. Windows. Forms. TextBox ();
This. groupBox1 = new System. Windows. Forms. GroupBox ();
This. c = new System. Windows. Forms. Button ();
This. ce = new System. Windows. Forms. Button ();
This. btn_rev = new System. Windows. Forms. Button ();
This. btn_dot = new System. Windows. Forms. Bu

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.