Unit1.cpp
上传用户:lhxd_sz
上传日期:2014-10-02
资源大小:38814k
文件大小:1k
- //---------------------------------------------------------------------------
- #include <vcl.h>
- #pragma hdrstop
- #include "Unit1.h"
- //---------------------------------------------------------------------------
- #pragma package(smart_init)
- #pragma resource "*.dfm"
- TForm1 *Form1;
- //---------------------------------------------------------------------------
- __fastcall TForm1::TForm1(TComponent* Owner)
- : TForm(Owner)
- {
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::Button1Click(TObject *Sender)
- {
- switch(RadioGroup1->ItemIndex)
- {
- case 1:
- Canvas->Font->PixelsPerInch=96;
- break;
- case 2:
- Canvas->Font->PixelsPerInch=180;
- break;
- case 3:
- Canvas->Font->PixelsPerInch=360;
- break;
- case 4:
- Canvas->Font->PixelsPerInch=720;
- break;
- case 5:
- Canvas->Font->PixelsPerInch=1440;
- break;
- default:
- Canvas->Font->PixelsPerInch=48;
- break;
- }
- Canvas->Font->Size=12;
- Canvas->TextOut(220,20,"中华人民共和国");
- }
- //---------------------------------------------------------------------------