📄 u8_2_1.cpp
字号:
//--------------------- u8_2_1 ------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "U8_2_1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
Tf8_2_1 *f8_2_1;
//---------------------------------------------------------------------------
__fastcall Tf8_2_1::Tf8_2_1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall Tf8_2_1::FormActivate(TObject *Sender)
{
edtUpper->SetFocus();
}
//---------------------------------------------------------------------------
void __fastcall Tf8_2_1::edtUpperKeyPress(TObject *Sender, char &Key)
{
if (Key>=97 && Key<=122)
{
Key-=32;
}
if (Key==VK_RETURN)
{
Key=0;
PostMessage(Handle,WM_NEXTDLGCTL,0,0);
}
}
//---------------------------------------------------------------------------
void __fastcall Tf8_2_1::edtLowerKeyPress(TObject *Sender, char &Key)
{
if (Key>=65 && Key<=90)
{
Key+=32;
}
if (Key==VK_RETURN)
{
Key=0;
edtNum->SetFocus();
}
}
//---------------------------------------------------------------------------
void __fastcall Tf8_2_1::edtNumKeyPress(TObject *Sender, char &Key)
{
if (Key<48 || Key>57) //獶计
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -