?? unit18.cpp
字號:
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit18.h"
#include "Unit1.h"
#include "Unit3.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
extern TColor tGraphColor; //圖形顏色
extern TColor tBrushColor; //填充顏色
extern TColor tGroundColor; //背景色
TColor tForm18TempColor;
TForm18 *Form18;
//---------------------------------------------------------------------------
__fastcall TForm18::TForm18(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm18::BitBtn2Click(TObject *Sender)
{
this->Close();
}
//---------------------------------------------------------------------------
void __fastcall TForm18::FormShow(TObject *Sender)
{
tForm18TempColor=Form3->Shape1->Brush->Color;
Edit1->Text=IntToStr(GetRValue(tForm18TempColor));
Edit2->Text=IntToStr(GetGValue(tForm18TempColor));
Edit3->Text=IntToStr(GetBValue(tForm18TempColor));
Shape1->Brush->Color=tForm18TempColor;
}
//---------------------------------------------------------------------------
void __fastcall TForm18::BitBtn1Click(TObject *Sender)
{
tForm18TempColor=Shape1->Brush->Color;
if(CheckBox1->Checked)
{
tGraphColor=tForm18TempColor;
Form1->Shape1->Brush->Color=tForm18TempColor;
}
if(CheckBox2->Checked)
{
tBrushColor=tForm18TempColor;
Form1->Shape2->Brush->Color=tForm18TempColor;
}
if(CheckBox3->Checked)
{
tGroundColor=tForm18TempColor;
Form1->Shape3->Brush->Color=tForm18TempColor;
}
Form3->Shape1->Brush->Color=tForm18TempColor;
Form1->StatusBar2->Panels->Items[1]->Text="RGB: ("+IntToStr(GetRValue(tForm18TempColor))+","+IntToStr(GetGValue(tForm18TempColor))+","+IntToStr(GetBValue(tForm18TempColor))+")";
}
//---------------------------------------------------------------------------
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -