unit1.cpp
来自「TTrialSoftware LITE时间限制的共享软件控件。(源代码」· C++ 代码 · 共 59 行
CPP
59 行
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "TrialSoftware"
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormCreate(TObject *Sender)
{
// You must only insert this line in Create event of main
// form to active my component
TrialSoftware1->Execute();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button2Click(TObject *Sender)
{
TrialSoftware1->ShowWindow();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button3Click(TObject *Sender)
{
// If you use this fuction you can make application with
// limitate feature
if (TrialSoftware1->Shareware()) {/* none */}
else {MessageDlg("You application is registered. This fuction is active now.", mtInformation, TMsgDlgButtons() << mbOK, 0);}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button4Click(TObject *Sender)
{
// Status property view status of program
if (TrialSoftware1->Status() == stRegistered)
Label8->Caption = "Registered";
else if (TrialSoftware1->Status() == stUnregistered)
Label8->Caption = "Unregistered";
else if (TrialSoftware1->Status() == stExpired)
Label8->Caption = "Expired";
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Form1->Close();
}
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?