日期:2008-12-09  浏览次数:20616 次


/*hycapril@sohu.com

需要的添加的控件,  

  private System.Windows.Forms.TextBox textBox1;
  private System.Windows.Forms.Panel panel1;
  private System.Windows.Forms.Button B_1;
  private System.Windows.Forms.Button B_N1;
  private System.Windows.Forms.Button B_N2;
  private System.Windows.Forms.Button B_N3;
  private System.Windows.Forms.Button B_N4;
  private System.Windows.Forms.Button B_N5;
  private System.Windows.Forms.Button B_N6;
  private System.Windows.Forms.Button B_N7;
  private System.Windows.Forms.Button B_N8;
  private System.Windows.Forms.Button B_N9;
  private System.Windows.Forms.Button B_N0;
  private System.Windows.Forms.Button B_ok;
  private System.Windows.Forms.Button B_Cancel;
  private System.Windows.Forms.Button B_J;
  private System.Windows.Forms.Button B_JJ;
  private System.Windows.Forms.Button B_C;
  private System.Windows.Forms.Button B_CC;
  private System.Windows.Forms.Button B_D;
  private System.Windows.Forms.Button B_B;

*/

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

namespace TextBoxControl
{
 /// <summary>
 /// TextBoxControl 的摘要说明。
 /// 带有小计算器的TextBox控件。
 /// hycapril 2005 04 06制作。
 /// </summary>

 public class TextBoxControl : System.Windows.Forms.UserControl
 {
  private System.Windows.Forms.TextBox textBox1;
  private System.Windows.Forms.Panel panel1;
  private System.Windows.Forms.Button B_1;
  private System.Windows.Forms.Button B_N1;
  private System.Windows.Forms.Button B_N2;
  private System.Windows.Forms.Button B_N3;
  private System.Windows.Forms.Button B_N4;
  private System.Windows.Forms.Button B_N5;
  private System.Windows.Forms.Button B_N6;
  private System.Windows.Forms.Button B_N7;
  private System.Windows.Forms.Button B_N8;
  private System.Windows.Forms.Button B_N9;
  private System.Windows.Forms.Button B_N0;
  private System.Windows.Forms.Button B_ok;
  private System.Windows.Forms.Button B_Cancel;
  private System.Windows.Forms.Button B_J;
  private System.Windows.Forms.Button B_JJ;
  private System.Windows.Forms.Button B_C;
  private System.Windows.Forms.Button B_CC;
  private System.Windows.Forms.Button B_D;
  private System.Windows.Forms.Button B_B;
  /// <summary>
  /// 必需的设计器变量。
  /// </summary>
  private System.ComponentModel.Container components = null;

  public TextBoxControl()
  {
   // 该调用是 Windows.Forms 窗体设计器所必需的。
   InitializeComponent();

   // TODO: 在 InitComponent 调用后添加任何初始化

  }

  /// <summary>
  /// 清理所有正在使用的资源。
  /// </summary>
  protected override void Dispose( bool disposing )
  {
   if( disposing )
   {
    if( components != null )
     components.Dispose();
   }
   base.Dispose( disposing );
  }

  #region 组件设计器生成的代码
  /// <summary>
  /// 设计器支持所需的方法 - 不要使用代码编辑器
  /// 修改此方法的内容。
  /// </summary>
  private void InitializeC