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

📄 baobiaou.~cpp

📁 这是个16路采集器的上位机源码。该套程序是由C++builder开发的
💻 ~CPP
字号:
//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "BaobiaoU.h"
#include "MainU.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TBaobiaoFrm *BaobiaoFrm;
//---------------------------------------------------------------------------
__fastcall TBaobiaoFrm::TBaobiaoFrm(TComponent* Owner)
        : TForm(Owner)
{
}
//---------------------------------------------------------------------------

void __fastcall TBaobiaoFrm::QRDBTC1Print(TObject *sender,
      AnsiString &Value)
{
   Value=FormatFloat("0.000",StrToFloat(Value));
}
//---------------------------------------------------------------------------
void __fastcall TBaobiaoFrm::QRDBTC2Print(TObject *sender,
      AnsiString &Value)
{
     Value=FormatFloat("0.000",StrToFloat(Value));
}
//---------------------------------------------------------------------------
void __fastcall TBaobiaoFrm::QRDBTC3Print(TObject *sender,
      AnsiString &Value)
{
    Value=FormatFloat("0.000",StrToFloat(Value));
}
//---------------------------------------------------------------------------
void __fastcall TBaobiaoFrm::QRDBTC4Print(TObject *sender,
      AnsiString &Value)
{
    Value=FormatFloat("0.000",StrToFloat(Value));    
}
//---------------------------------------------------------------------------
void __fastcall TBaobiaoFrm::QRDBTTimePrint(TObject *sender,
      AnsiString &Value)
{
   //Value=FormatDateTime("hh:mm:ss",Value);     
}
//---------------------------------------------------------------------------
void __fastcall TBaobiaoFrm::Button2Click(TObject *Sender)
{
   QuickRep1->Preview();     
}
//---------------------------------------------------------------------------
void __fastcall TBaobiaoFrm::QRSysData2Print(TObject *sender,
      AnsiString &Value)
{
    Value="第"+Value+"页";    
}
//---------------------------------------------------------------------------
void __fastcall TBaobiaoFrm::QRSysData3Print(TObject *sender,
      AnsiString &Value)
{
   Value="打印时间"+Value;
}
//---------------------------------------------------------------------------

void __fastcall TBaobiaoFrm::ADOQuery1BeforeOpen(TDataSet *DataSet)
{
    //by fang 2008.1.11
    AnsiString ConnStr="";
    ConnStr  = " Provider=Microsoft.Jet.OLEDB.4.0;";
    ConnStr += "Data Source=" +  MainFrm->AdoDir +";";
    ConnStr += " Persist Security Info=False";
    this->ADOQuery1->ConnectionString = ConnStr;     
}
//---------------------------------------------------------------------------

⌨️ 快捷键说明

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