unit18.~cpp

来自「毕业设计图像处理软件及源代码对毕业生会有所帮助」· ~CPP 代码 · 共 51 行

~CPP
51
字号
//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "Unit18.h"
#include "Unit1.h"
#include "Unit3.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
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)
                Form1->Shape1->Brush->Color=tForm18TempColor;
        if(CheckBox2->Checked)
                Form1->Shape2->Brush->Color=tForm18TempColor;
        if(CheckBox3->Checked)
                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 + =
减小字号Ctrl + -
显示快捷键?