没有合适的资源?快使用搜索试试~ 我知道了~
代码如下: using System; using System.Drawing; using System.Windows; using System.Windows.Forms; using System.Collections; using System.ComponentModel; using System.Data; namespace comput { /// <summary> /// 这是一个计算器的简单实现。 /// </summary> public class Form1 : System.Windows.Forms.Form {
资源推荐
资源详情
资源评论
C#编写的编写的windows计算器的实例代码计算器的实例代码
代码如下:
using System;
using System.Drawing;
using System.Windows;
using System.Windows.Forms;
using System.Collections;
using System.ComponentModel;
using System.Data;
namespace comput
{
/// <summary>
/// 这是一个计算器的简单实现。
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
#region 控件声明
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>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public Form1()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#endregion
#region 各控件的属性的方法Windows Form Designer generated code
/// <summary>
/// 设计器支持所需的方法 – 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
this.txtShow = 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.Button();
this.btn_add = new System.Windows.Forms.Button();
this.btn_equ = new System.Windows.Forms.Button();
this.btn_sign = new System.Windows.Forms.Button();
this.btn_sub = new System.Windows.Forms.Button();
this.btn_mul = new System.Windows.Forms.Button();
this.btn_0 = new System.Windows.Forms.Button();
this.btn_3 = new System.Windows.Forms.Button();
this.btn_2 = new System.Windows.Forms.Button();
this.btn_1 = new System.Windows.Forms.Button();
this.btn_6 = new System.Windows.Forms.Button();
this.btn_5 = new System.Windows.Forms.Button();
this.btn_4 = new System.Windows.Forms.Button();
this.btn_sqrt = new System.Windows.Forms.Button();
this.btn_div = new System.Windows.Forms.Button();
this.btn_7 = new System.Windows.Forms.Button();
this.btn_8 = new System.Windows.Forms.Button();
this.btn_9 = new System.Windows.Forms.Button();
this.btn_sqr = new System.Windows.Forms.Button();
this.mainMenu1 = new System.Windows.Forms.MainMenu();
this.menuItem1 = new System.Windows.Forms.MenuItem();
this.menuItem2 = new System.Windows.Forms.MenuItem();
this.menuItem3 = new System.Windows.Forms.MenuItem();
this.menuItem4 = new System.Windows.Forms.MenuItem();
this.menuItem5 = new System.Windows.Forms.MenuItem();
this.menuItem6 = new System.Windows.Forms.MenuItem();
this.menuItem8 = new System.Windows.Forms.MenuItem();
this.menuItem9 = new System.Windows.Forms.MenuItem();
this.menuItem10 = new System.Windows.Forms.MenuItem();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// txtShow
//
this.txtShow.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(192)), ((System.Byte)(192)),
((System.Byte)(255)));
this.txtShow.Font = new System.Drawing.Font(“宋体”, 10.5F, System.Drawing.FontStyle.Regular,
System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.txtShow.ForeColor = System.Drawing.Color.Purple;
this.txtShow.Location = new System.Drawing.Point(25, 8);
this.txtShow.Name = “txtShow”;
剩余12页未读,继续阅读
资源评论
weixin_38704156
- 粉丝: 6
- 资源: 909
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- MATLAB-simulink主动均衡电路模型#汽车级锂电池 动力锂电池模组(16节电芯) 主动均衡电路:Buck-boost电路 均衡对象:SOC 可调整充电电流 与放电电流 版本2020b
- 纺织生产绕线生产线sw17可编辑全套技术资料100%好用.zip
- SAP PS模块详细配置手册
- MATLAB统一潮流控制器仿真模型,UPFC模型,基于模块化多电平MMC的UPFC 高压输电线路
- aapt.exe + aapt2.exe
- SAP QM质量管理模块详细配置指南(S4/HANA系统)
- Comsol(光电仿真)光子晶体微腔及其傅里叶变分析 包含comsol和fdtd模型,以及matlab代码 ①传播表面等离激元和表面等离激元光栅等 ②类比凝聚态领域魔角石墨烯的 moir e 光子晶
- GSDML-V2.2-Hein Lanz-XE-20170410.xml
- 防静电电离鼓风机step全套技术资料100%好用.zip
- 钢材打捆机sw22可编辑全套技术资料100%好用.zip
- gsdml-v2.2-pepperl+fuchs-encoder-ena58il-20161028.xml
- MMC-HVDC模拟背靠背HVDC模块化多电平流器(MMC)作为为整个电网供电的电能质量调节系统 因此,模块化多电平逆变器作为远程端转器运行,也称为孤岛模式 这种电能质量调节系统的主要目标是能够保
- GSDML-V2.3-MT-IND331-PIR-20160408.xml
- SAP销售与分销(SD)模块的最佳业务实践培训指南
- GSDML-V2.3-Schneider-ATV71-20131127.xml
- GSDML-V2.3-Schneider-ATV320-20161117.xml
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功