📄 sms2.cpp
字号:
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "sms2.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm2 *Form2;
//---------------------------------------------------------------------------
__fastcall TForm2::TForm2(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button1Click(TObject *Sender)
{
TRegistry *Reg =new TRegistry;
String code;
int BSH=100,acc;
try{
Reg->RootKey=HKEY_CURRENT_USER;
if(Reg->OpenKey("\\Software\\ZHsms\\sms",false)!=false)
{
acc= Reg->ReadInteger("2");
if(acc>60)
Reg->WriteInteger("2",0);
Label2->Caption="支持国产软件,请注册。如果不注册,使用的次数受到限制! ";
Label2->Caption=Label2->Caption+ "\r\n还可以免费使用 "+IntToStr(acc)+" 次! ";
Label2->Caption=Label2->Caption+ "\r\n可通过e_mail: herosers@hotmail.com 咨询";
Label2->Caption=Label2->Caption+ "\r\n注册费人民币 9 元 ";
Reg->WriteString("1",Edit1->Text);
}
else ShowMessage("注册错误,请重试!");
}
__finally
{
Reg->CloseKey();
delete Reg;
}
Form2->Close();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::FormCreate(TObject *Sender)
{
Label2->Caption="支持国产软件,请注册。如果不注册,使用的次数受到限制! ";
//Label2->Caption=Label2->Caption+ "\r\n还可以免费使用 "+IntToStr(acc)+" 次! ";
Label2->Caption=Label2->Caption+ "\r\n可通过e_mail: buy@duanxiaoxi.com 咨询,或到www.duanxiaoxi.com寻求帮助。";
Label2->Caption=Label2->Caption+ "\r\n注册费人民币 9 元 ";
}
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -