?? unit15.cpp
字號(hào):
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit15.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
extern int iNewWidth,iNewHeight; //新建畫布寬和高
extern TColor tGroundColor; //背景色
extern int iReturnValue; //取值窗口返回值
TForm15 *Form15;
//---------------------------------------------------------------------------
__fastcall TForm15::TForm15(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm15::FormShow(TObject *Sender)
{
Shape1->Brush->Color=tGroundColor;
iReturnValue=0;
}
//---------------------------------------------------------------------------
void __fastcall TForm15::Button3Click(TObject *Sender)
{
this->Close();
}
//---------------------------------------------------------------------------
void __fastcall TForm15::Button2Click(TObject *Sender)
{
iNewWidth=StrToInt(Edit1->Text);
iNewHeight=StrToInt(Edit2->Text);
if(iNewWidth<1||iNewWidth>1000||iNewHeight<1||iNewHeight>1000)
{
MessageBox(NULL,"寬高設(shè)置不正確,請(qǐng)重設(shè),保證在1到1000之間","錯(cuò)誤",MB_OK);
return;
}
iReturnValue=1;
tGroundColor=Shape1->Brush->Color;
this->Close();
}
//---------------------------------------------------------------------------
void __fastcall TForm15::Button1Click(TObject *Sender)
{
if (ColorDialog1->Execute())
Shape1->Brush->Color=ColorDialog1->Color;
}
//---------------------------------------------------------------------------
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -