⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unit4.~cpp

📁 一个小的冰酒公司的销售系统。可以进行数据插入
💻 ~CPP
字号:
//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop


#include "Unit1.h"
#include "Unit2.h"
#include "Unit3.h"
#include "Unit4.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"



TMain *Main;
//---------------------------------------------------------------------------
__fastcall TMain::TMain(TComponent* Owner)
        : TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TMain::FormPaint(TObject *Sender)
{
  Graphics::TBitmap* pBmp=new Graphics::TBitmap();
  pBmp->LoadFromFile("Main.bmp");
  TRect MyRect=TRect(0,0,Width,Height);
  Main->Canvas->StretchDraw(MyRect,pBmp);
  delete pBmp;
}
//---------------------------------------------------------------------------
void __fastcall TMain::FormResize(TObject *Sender)
{
  
    this->Refresh();          
}
//---------------------------------------------------------------------------
void __fastcall TMain::Button2Click(TObject *Sender)
{
  Close();
}
//---------------------------------------------------------------------------






void __fastcall TMain::Button1Click(TObject *Sender)
{
  if(ComboBox1->Text=="Staff"&&Edit2->Text=="Staff")
  {
    Staff->Show();
    Main->Hide();
  }
    else if (ComboBox1->Text=="Account"&&Edit2->Text=="Account")
      {
        Account->Show();
        Main->Hide();
      }
        else if (ComboBox1->Text=="Admin"&&Edit2->Text=="Admin")
        {
          Admin->Show();
          Main->Hide();
        }
          else
          ShowMessage("Sorry! You can't use this system!");


}
//---------------------------------------------------------------------------



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -