⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unit3.cpp

📁 光学仪器的控制系统 用于教学和科研的仪器
💻 CPP
字号:
//---------------------------------------------------------------------------
#pragma hdrstop
#include <vcl.h>


#include "Unit3.h"
#include "IsNumber.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TInputConst *InputConst;
//---------------------------------------------------------------------------
__fastcall TInputConst::TInputConst(TComponent* Owner)
        : TForm(Owner)
{
 Value=0;
}
//---------------------------------------------------------------------------
void __fastcall TInputConst::ButtonOKClick(TObject *Sender)
{
 Value=StrToFloat(EditValue->Text);
 Close();        
}
//---------------------------------------------------------------------------
void __fastcall TInputConst::ButtonCancelClick(TObject *Sender)
{
 Value=0;
 Close();
}
//---------------------------------------------------------------------------
void __fastcall TInputConst::FormShow(TObject *Sender)
{
 this->ActiveControl=EditValue;        
}
//---------------------------------------------------------------------------
void __fastcall TInputConst::EditChange(TObject *Sender)
{
 TEdit *tEdit=(TEdit *)Sender;
 tEdit->Text=IsNumber(tEdit->Text);        
}
//---------------------------------------------------------------------------

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -